amigaBlock-method {adfExplorer}R Documentation

Extract block from or replace a block on an amigaDisk object

Description

Extract an amigaBlock from an amigaDisk object, or replace it on the disk.

Usage

## S4 method for signature 'amigaDisk,numeric'
amigaBlock(x, block)

## S4 replacement method for signature 'amigaDisk,numeric,amigaBlock'
amigaBlock(x, block) <- value

Arguments

x

An amigaDisk object from which the block needs to be extracted or on which the block needs to be replaced.

block

A numeric identifier (whole numbers ranging from 0 up to 1759 (DD disk) or 3519 (HD disk)).

value

An amigaBlock object with which the block at the specified location on the disk needs to be replaced.

Details

Information is stored in 512 byte blocks on floppy disks. This method extracts a specific block at a numeric identifier (whole numbers ranging from 0 up to 1759 (DD disk) or 3519 (HD disk)) from an amigaDisk object.

Value

The amigaBlock object at the specified location is returned. In case of the replace method, an amigaDisk object with a replaced amigaBlock is returned.

Author(s)

Pepijn de Vries

See Also

Other block.operations: get.blockID(), get.diskLocation()

Examples

## get the root block from the example adf:
amigaBlock(adf.example, 880)

## Create a completely blank disk without file system:
blank.disk <- new("amigaDisk")

## Replace the boot block on the blank disk with
## that from the example object:
amigaBlock(blank.disk, 0) <- amigaBlock(adf.example, 0)

## The blank disk now has a boot block,
## but still no file system...

[Package adfExplorer version 0.1.8 Index]