The R Project SVN R

Rev

Rev 59039 | Rev 71391 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
56167 ripley 1
% File src/library/base/man/Sys.info.Rd
2
% Part of the R package, http://www.R-project.org
59039 ripley 3
% Copyright 2011 R Core Team
56167 ripley 4
% Distributed under GPL 2 or later
5
 
6
\name{Sys.setFileTime}
56186 murdoch 7
\alias{Sys.setFileTime}
56167 ripley 8
\title{
9
  Set File Time
10
}
11
\description{
12
  Uses system calls to set the times on a file or directory.
13
}
14
\usage{
15
Sys.setFileTime(path, time)
16
}
17
 
18
\arguments{
19
  \item{path}{
20
    A length-one character vector specifying the path to a file or directory.
21
  }
22
  \item{time}{
23
    A date-time of class \code{"\link{POSIXct}"} or an object which can
24
    be coerced to one.  Fractions of a second are ignored.
25
  }
26
}
27
\details{
28
  This attempts sets the file time to the value specified.
61433 ripley 29
 
56167 ripley 30
  On a Unix-alike it uses the system call \code{utimes} if that is
31
  available, otherwise \code{utimes}.  On a POSIX file system it sets
32
  both the last-access and modification times.
61433 ripley 33
 
56167 ripley 34
  On Windows it uses the system call \code{SetFileTime} to set the
35
  \sQuote{last write time}.  Some Windows file systems only record the
36
  time at a resolution of two seconds.
37
}
38
\value{
39
  Logical, invisibly.  An indication if the operation succeeded.
40
}
41
\keyword{file}
42