Obtain file information of file from a virtual amigaDisk object.
Usage
# S4 method for class 'amigaDisk,character'
adf.file.info(x, path)
# S4 method for class 'amigaDisk,character'
adf.file.mode(x, path)
# S4 method for class 'amigaDisk,character,character'
adf.file.mode(x, path) <- value
# S4 method for class 'amigaDisk,character,logical'
adf.file.mode(x, path) <- value
# S4 method for class 'amigaDisk,character,missing'
adf.file.time(x, path, which)
# S4 method for class 'amigaDisk,character,character'
adf.file.time(x, path, which = c("m", "c", "a"))
# S4 method for class 'amigaDisk,character,missing,POSIXt'
adf.file.time(x, path, which) <- value
# S4 method for class 'amigaDisk,character,character,POSIXt'
adf.file.time(x, path, which = c("m", "c", "a")) <- value
# S4 method for class 'amigaDisk,character'
adf.file.size(x, path)Arguments
- x
An
amigaDiskobject in which this method will obtain file information.- path
A (
vectorof)characterstring(s) representing a file or directory name. Use Amiga specifications for file name (seecurrent.adf.dir). Wildcards are not allowed.- value
In case of
adf.file.timean object of classbase::POSIXt. In case ofadf.file.modeeither a character string representing the flags, or avectorof namedlogicalvalues, where the name of thelogicalrepresents the flag to be altered (see also details).- which
Character indicating which time to obtain/modify. One of
"m"(date modified),"c"(date created), or"a"(date root modification). This parameter works only on the disk's root and will be ignored for any other directory or file.
Value
In case of the replace methods, an amigaDisk class object is returned with the file
information updated. Otherwise, it will return the requested file information (see also details).
Details
Use adf.file.mode to obtain or set a character string reflecting which
file mode flags are set, where:
D: deletableE: executableW: writeableR: readableA: archivedP: pure commandS: scriptH: holdstarting without lower case: applies to user
starting with lower case
g: applies to groupstarting with lower case
o: applies to other
Use adf.file.time to obtain or set the base::POSIXt properties of
a file on an amigaDisk.
Use adf.file.info to obtain a combination of the information
listed above in a data.frame.
Examples
if (FALSE) { # \dontrun{
data(adf.example)
adf.file.mode(adf.example, c("mods", "mods/mod.intro"))
adf.file.time(adf.example, c("mods", "mods/mod.intro"))
adf.file.size(adf.example, c("mods", "mods/mod.intro"))
adf.file.info(adf.example, c("mods", "mods/mod.intro"))
## set the writeable flag for a group to TRUE
adf.file.mode(adf.example, "mods/mod.intro") <- c(gW = T)
## Set the modified time-stamp to the current system time
adf.file.time(adf.example, "mods/mod.intro") <- Sys.time()
} # }