Sys.setFileTime | R Documentation |
Uses system calls to set the times on a file or directory.
Sys.setFileTime(path, time)
path |
A character vector containing file or directory paths. |
time |
A date-time of class |
This attempts sets the file time to the value specified.
On a Unix-alike it uses the system call utimensat
if that is
available, otherwise utimes
or utime
. On a POSIX file
system it sets both the last-access and modification times.
Fractional seconds will set as from R 3.4.0 on OSes with the
requisite system calls and suitable filesystems.
On Windows it uses the system call SetFileTime
to set the
‘last write time’. Some Windows file systems only record the
time at a resolution of two seconds.
Sys.setFileTime
has been vectorized in R 3.6.0. Earlier versions
of R required path
and time
to be vectors of length one.
A logical vector indicating if the operation succeeded for each of the files and directories attempted, returned invisibly.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.