Learn R Programming

adfExplorer (version 0.1.8)

amigaBlock-method: 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 amigaDisk,numeric
amigaBlock(x, block)

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

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.

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.

Author

Pepijn de Vries

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.

See Also

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

Examples

Run this code
## 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...

Run the code above in your browser using DataLab