Get or set the current directory of an amigaDisk object
Source:R/02amigaDiskBasics.r
current.adf.dir.Rd
Get or set the current directory of an amigaDisk
object.
Usage
# S4 method for amigaDisk
current.adf.dir(x)
# S4 method for amigaDisk,character
current.adf.dir(x) <- value
Arguments
- x
An
amigaDisk
object for which the current directory needs to be obtained or changed.- value
A
character
representation of the path, that needs to be set as current directory. Use Amiga DOS syntax as specified in the details
Details
By default the disk's root is stored as the current directory
for a new amigaDisk
object. With this method, the
current directory can be retrieved or changed.
For this purpose the path should be specified conform Amiga DOS syntax. Use the disk's name or "DF0" followed by a colon in order to refer to the disk's root. Subdirectories are separated by forward slashes ("/"). Colons and forward slashes are not allowed in file and directory names. Both upper and lowercase letters are allowed in file and directory names. The case is ignored when identifying files however. This packages will NOT follow the Amiga's full search path (https://wiki.amigaos.net/wiki/AmigaOS_Manual:_AmigaDOS_Working_With_AmigaDOS#Search_Path).
Examples
data(adf.example)
## by default the current dir is the
## disk's root. The disk name is
## therefore shown when running
## current.adf.dir for the provided
## example data:
current.adf.dir(adf.example)
#> [1] "adfExampleOFS:"
## change the current dir:
current.adf.dir(adf.example) <- "DF0:this/is/a/deep/path"
## confirm that it has changed:
current.adf.dir(adf.example)
#> [1] "adfExampleOFS:this/is/a/deep/path/"
## let's set it back to the disk's root:
current.adf.dir(adf.example) <- "DF0:"