EVOLUTION-MANAGER
Edit File: Sys.setFileTime.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>R: Set File Time</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" type="text/css" href="R.css" /> </head><body> <table width="100%" summary="page for Sys.setFileTime {base}"><tr><td>Sys.setFileTime {base}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2> Set File Time </h2> <h3>Description</h3> <p>Uses system calls to set the times on a file or directory. </p> <h3>Usage</h3> <pre> Sys.setFileTime(path, time) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>path</code></td> <td> <p>A character vector containing file or directory paths. </p> </td></tr> <tr valign="top"><td><code>time</code></td> <td> <p>A date-time of class <code>"<a href="DateTimeClasses.html">POSIXct</a>"</code> or an object which can be coerced to one. Fractions of a second may be ignored. Recycled along <code>paths</code>. </p> </td></tr> </table> <h3>Details</h3> <p>This attempts sets the file time to the value specified. </p> <p>On a Unix-alike it uses the system call <code>utimensat</code> if that is available, otherwise <code>utimes</code> or <code>utime</code>. On a POSIX file system it sets both the last-access and modification times. Fractional seconds will set as from <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> 3.4.0 on OSes with the requisite system calls and suitable filesystems. </p> <p>On Windows it uses the system call <code>SetFileTime</code> to set the ‘last write time’. Some Windows file systems only record the time at a resolution of two seconds. </p> <p><code>Sys.setFileTime</code> has been vectorized in <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> 3.6.0. Earlier versions of <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> required <code>path</code> and <code>time</code> to be vectors of length one. </p> <h3>Value</h3> <p>A logical vector indicating if the operation succeeded for each of the files and directories attempted, returned invisibly. </p> <hr /><div style="text-align: center;">[Package <em>base</em> version 3.6.0 <a href="00Index.html">Index</a>]</div> </body></html>