## Get a file from an amigaDisk object

### Description

Get files stored on virtual amigaDisks as raw data or copy as file.

### Usage

## S4 method for signature 'amigaDisk,character,missing'

## S4 method for signature 'amigaDisk,character,character'

## S4 method for signature 'amigaDisk,character,ANY'


### Arguments

 x An amigaDisk object from which a file needs to be extracted. source Specify the source file's path on the amigaDisk object, conform Amiga specs. See current.adf.dir for details on these specs. destination either a file name or a file connection, that allows writing binary data (see e.g., file or url). When the destination is missing, the file content is returned as raw data.

### Details

Amiga DOS formatted disks can store any kind of file (as long as the disk's capacity allows it). Use this method to extract such files embedded in an Amiga Disk File (ADF) as raw data or copy to a file on your system.

### Value

Returns a vector of raw data when the argument destination is missing. Otherwise returns nothing.

Pepijn de Vries

### Examples

data(adf.example)

## Not run:
## get the file "Startup-Sequence" from the virtual
## example disk and save as a text file in the
## current working directory:

## End(Not run)

## get the same file as raw data
## by omitting the destination:

## Look, it's a text file:
cat(rawToChar(startup))

if (requireNamespace("ProTrackR", quietly = TRUE)) {
## look there is a typical ProTracker module on
## the example disk. You can load it like this:

## get the file from the virtual disk
## as raw data

## open a raw connection with the
## newly imported raw data
con <- rawConnection(mod.raw, "rb")

## and read it as a ProTracker module