adf.file.info {adfExplorer}R Documentation

File information on virtual amigaDisk objects

Description

Obtain file information of file from a virtual amigaDisk object.

Usage

## S4 method for signature 'amigaDisk,character'
adf.file.info(x, path)

## S4 method for signature 'amigaDisk,character'
adf.file.mode(x, path)

## S4 replacement method for signature 'amigaDisk,character,character'
adf.file.mode(x, path) <- value

## S4 replacement method for signature 'amigaDisk,character,logical'
adf.file.mode(x, path) <- value

## S4 method for signature 'amigaDisk,character,missing'
adf.file.time(x, path, which)

## S4 method for signature 'amigaDisk,character,character'
adf.file.time(x, path, which = c("m", "c", "a"))

## S4 replacement method for signature 'amigaDisk,character,missing,POSIXt'
adf.file.time(x, path, which) <- value

## S4 replacement method for signature 'amigaDisk,character,character,POSIXt'
adf.file.time(x, path, which = c("m", "c", "a")) <- value

## S4 method for signature 'amigaDisk,character'
adf.file.size(x, path)

Arguments

x

An amigaDisk object in which this method will obtain file information.

path

A (vector of) character string(s) representing a file or directory name. Use Amiga specifications for file name (see current.adf.dir). Wildcards are not allowed.

value

In case of adf.file.time an object of class base::POSIXt. In case of adf.file.mode either a character string representing the flags, or a vector of named logical values, where the name of the logical represents 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.

Details

Use adf.file.mode to obtain or set a character string reflecting which file mode flags are set, where:

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.

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).

Author(s)

Pepijn de Vries

Examples

## Not run: 
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()

## End(Not run)

[Package adfExplorer version 0.1.8 Index]