file.info
Extract File Information
Description
Gets information about the specified file(s). The information can include such details as size, mode, and modification time.
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
are in the return value. The default is TRUE.
 | 
 
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
| file.info | 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"). Specifies 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 owner of the file. 
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 
owner of the file. Used only on Unix-like systems.  |  | 
 |   |  grname  |   a character string. Specifies the group name of the 
group for the file. Used only on Unix-like systems. If the file 
does not exist, those items are displayed as NAs.
 |   
 | 
| file.mode | returns the mode of the file. | 
| file.mtime | returns the modification time of the file. | 
| file.size | returns the file size in bytes. | 
 
Differences between Spotfire Enterprise Runtime for R and Open-source R
In Spotfire 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)
file.info("a-string-object") 
file.mtime(dir(R.home("etc"), full.names=TRUE))
file.size(dir(R.home("etc"), full.names=TRUE))
file.mode(dir(R.home("etc"), full.names=TRUE))