Debian Codegraph @

man/file_touch.Rd

raw
1 % Generated by roxygen2: do not edit by hand
2 % Please edit documentation in R/file.R
3 \name{file_touch}
4 \alias{file_touch}
5 \title{Change file access and modification times}
6 \usage{
7 file_touch(path, access_time = Sys.time(), modification_time = access_time)
8 }
9 \arguments{
10 \item{path}{A character vector of one or more paths.}
11
12 \item{access_time, modification_time}{The times to set, inputs will be
13 coerced to \link{POSIXct} objects.}
14 }
15 \description{
16 Like the touch POSIX utility this will create the file if it does not
17 exist.
18 }
19 \examples{
20 \dontshow{.old_wd <- setwd(tempdir())}
21 file_touch("foo", "2018-01-01")
22 file_info("foo")[c("access_time", "modification_time", "change_time", "birth_time")]
23 \dontshow{setwd(.old_wd)}
24 }