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:
- "uid"
- "gid"
- "uname"
- "grname"
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:
size | An integer. Specifies the file size in bytes. |
isdir | A logical value. TRUE if the name is a
directory. |
mode | An integer. Specifies the file permissions. |
mtime, ctime, atime | Integers of class
c("POSIXt", "POSIXct"). Specify file modification, change, and
access times. |
exe | A character string. Specifies the target OS binary
type of the file, if it is a binary file. Used only on Windows systems. |
uid | An integer. Specifies the user ID of the file's owner.
Used only on Unix-like systems. |
gid | An integer. Specifies the group ID of the file's
group. Used only on Unix-like systems. |
uname | A character string. Specifies the user name of the
file's owner. Used only on Unix-like systems. |
grname | A 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
Examples
file.info(dir(R.home("etc"), full.names=TRUE), extra_cols=FALSE)