Skip to contents

Remove a file from a virtual Amiga floppy disk represented by an amigaDisk object.

Usage

# S4 method for amigaDisk,character,logical
adf.file.remove(x, file, full)

# S4 method for amigaDisk,character,missing
adf.file.remove(x, file)

Arguments

x

An amigaDisk onto which the file should be put.

file

A character string of the path on the virtual floppy of the file that should be removed. The path should be conform Amiga specs (see current.adf.dir). Wild cards are not allowed (see details). Both files and directories can be removed from the virtual disk using this function.

full

A logical value (default is FALSE). When set to TRUE not only pointers to the file are removed, but also the data in the header and data blocks. When set to FALSE, the data is left as orphans on the disk. Technically, these files can be undeleted, unless they are overwritten.

Value

Returns an amigaDisk object where the specified file is removed.

Details

Remove a file from a virtual Amiga floppy disk (represented by an amigaDisk object. Make sure that the virtual disk is DOS formatted (see is.amigaDOS). This method can only remove one file at a time from a virtual virtual disk, it is not allowed to use wild cards in the source or destination names. It is possible to remove an entire directory at once. Use loops to remove multiple files/directories from a virtual disk.

Author

Pepijn de Vries

Examples

if (FALSE) {
## This removes a single file from a disk
resulting.disk <- adf.file.remove(adf.example, "df0:mods/mod.intro")

## This removes the entire 's' directory and cannot be undone:
resulting.disk <- adf.file.remove(adf.example, "df0:s", TRUE)
}