read.adf {adfExplorer}R Documentation

Read an Amiga Disk File

Description

Read data from an Amiga Disk File (ADF) to an amigaDisk object. Alternatively data can be read from an ADZ file.

Usage

## S4 method for signature 'character'
read.adf(file)

## S4 method for signature 'ANY'
read.adf(file)

## S4 method for signature 'character'
read.adz(file)

Arguments

file

Either a file name or a file connection, that allows reading binary data (see e.g., file or url). read.adz only accepts file names.

Details

Amiga Disk Files usually have a .adf-extension to the file name. It should be 880 kB (double density) or 1760 kB (high density) in size. This function can read such files.

Alternatively, ADZ files can also be read. These are essentially gzipped ADF files.

Note that this package cannot read extended ADF files containing information on the disk's Modified frequency modulation (MFM). This information is typically only required for copy protected disk's and is therefore out of the scope of this package.

Value

Returns an amigaDisk object read from the provided Amiga disk file

Author(s)

Pepijn de Vries

See Also

Other io.operations: write.adf()

Examples

## Not run: 
## In order to read an adf-file, we first need one.
## so let's first write the example object to a file:
data(adf.example)

## write it to the current working directory:
write.adf(adf.example, "test.adf")

## now we can read it again:
my.disk <- read.adf("test.adf")
print(my.disk)

## and this is how you read it,
## using a connection:
con <- file("test.adf", "rb")
my.disk2 <- read.adf(con)
close(con)

print(my.disk2)

## Alternatively, you can work with ADZ files:
write.adz(adf.example, "test.adz")
my.disk3 <- read.adz("test.adz")

print(my.disk3)

## End(Not run)

[Package adfExplorer version 0.1.6 Index]