file.info
Extract File Information

Description

Get information such as size, mode, and modification time about files.

Usage

file.info(..., extra_cols = TRUE)
file.mode(...)
file.mtime(...)
file.size(...)

Arguments

... character vector(s) containing file names, including the path if the files are not located in the current working directory.
extra_cols a logical value. If FALSE, only the size, isdir, mode, mtime, ctime, and atime columns will be in the return value.

Details

On non-POSIX, Unix-like platforms, the following columns are not provided: The column "exe" is provided only on Windows.
Value
returns a data frame having row names the same as the input file names and the following columns:
sizeAn integer. Specifies the file size in bytes.
isdirA logical value. TRUE if the name is a directory.
modeAn integer. Specifies the file permissions.
mtime, ctime, atimeIntegers of class c("POSIXt", "POSIXct"). Specify file modification, change, and access times.
exeA character string. Specifies the target OS binary type of the file, if it is a binary file. Used only on Windows systems.
uidAn integer. Specifies the user ID of the file's owner. Used only on Unix-like systems.
gidAn integer. Specifies the group ID of the file's group. Used only on Unix-like systems.
unameA character string. Specifies the user name of the file's owner. Used only on Unix-like systems.
grnameA character string. Specifies the group name of the file's group. Used only on Unix-like systems. If the file does not exist, those items are NAs.
Differences between TIBCO Enterprise Runtime for R and Open-source R
In TIBCO Enterprise Runtime for R, 'uid', 'gid', 'uname' and 'grname' fields are never included. The 'exe' field is provided on all platforms, but says only "no" or "yes". In open-source R on Windows, it says "no", "win64", or "win32".
See Also
list.files, dir, file.exists, dir.exists, dir.create, file.access, is.dir.
Examples
file.info(dir(R.home("etc"), full.names=TRUE), extra_cols=FALSE)
Package base version 4.0.0-28
Package Index