adf_directory {adfExplorer} | R Documentation |
Changing and creating directories on a virtual device
Description
adf_directory()
shows the current directory of a virtual device, when a file
system is present. When connecting to or creating a new device, the current
directory is the disk's root by default. To change the current directory,
use adf_directory()
in combination with the assign operator (<-
).
Usage
adf_directory(dev, ...)
## S3 method for class 'adf_device'
adf_directory(dev, ...)
adf_directory(dev, ...) <- value
## S3 replacement method for class 'adf_device'
adf_directory(dev, ...) <- value
## S3 replacement method for class 'adf_device.character'
adf_directory(dev, ...) <- value
## S3 replacement method for class 'adf_device.virtual_path'
adf_directory(dev, ...) <- value
make_adf_dir(x, path, ...)
## S3 method for class 'adf_device'
make_adf_dir(x, path, ...)
## S3 method for class 'virtual_path'
make_adf_dir(x, path, ...)
## S3 method for class 'character'
make_adf_dir.adf_device(x, path, ...)
## S3 method for class 'virtual_path'
make_adf_dir.adf_device(x, path, ...)
Arguments
dev |
The virtual adf device for which information needs to be obtained.
It should be of class |
... |
Ignored |
value |
A |
x |
An |
path |
A |
Details
To create a new directory on a device use make_adf_dir()
and use a full or
relative path name to specify the new directory name.
See vignette("virtual_paths")
for a note on file and directory names on the Amiga.
Value
make_adf_dir()
returns the device connection. adf_directory()
returns
the current directory as a virtual_path
class object.
Author(s)
Pepijn de Vries
Examples
## ADZ files can only be opened in 'write protected' mode
## extract it to a temporary file to allow writing to the virtual disk
adf_file <- tempfile(fileext = ".adf")
decompress_adz(
system.file("example.adz", package = "adfExplorer"),
adf_file)
## Open virtual device to demonstrate methods
my_device <- connect_adf(adf_file, write_protected = FALSE)
## Show the current directory
adf_directory(my_device)
## Create a new directory
make_adf_dir(my_device, "DF0:s/newdir")
## Change the current dir to the new directory:
adf_directory(my_device) <- "DF0:s/newdir"
## Close the virtual device
close(my_device)