Sys.setFileTime

0th

Percentile

Set File Time

Uses system calls to set the times on a file or directory.

Keywords
file
Usage
Sys.setFileTime(path, time)
Arguments
path
A length-one character vector specifying the path to a file or directory.
time
A date-time of class "POSIXct" or an object which can be coerced to one. Fractions of a second are ignored.
Details

This attempts sets the file time to the value specified.

On a Unix-alike it uses the system call utimes if that is available, otherwise utimes. On a POSIX file system it sets both the last-access and modification times.

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.

Value

Logical, invisibly. An indication if the operation succeeded.

Aliases
  • Sys.setFileTime
Documentation reproduced from package base, version 3.3.0, License: Part of R 3.3.0

Community examples

Looks like there are no examples yet.