Skip to content

Commit e4ff9bf

Browse files
authored
Update file_touch documentation
Per #169, this _does_ create the file if it does not exist.
1 parent 8d40528 commit e4ff9bf

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

R/file.R

+2-3
Original file line numberDiff line numberDiff line change
@@ -227,16 +227,15 @@ file_move <- function(path, new_path) {
227227

228228
#' Change file access and modification times
229229
#'
230-
#' Unlike the touch POSIX utility this does not create the file if it does not
231-
#' exist. Use [file_create()] to do this if needed.
230+
#' Like the touch POSIX utility this will create the file if it does not
231+
#' exist.
232232
#'
233233
#' @template fs
234234
#'
235235
#' @param access_time,modification_time The times to set, inputs will be
236236
#' coerced to [POSIXct] objects.
237237
#' @examples
238238
#' \dontshow{.old_wd <- setwd(tempdir())}
239-
#' file_create("foo")
240239
#' file_touch("foo", "2018-01-01")
241240
#' file_info("foo")[c("access_time", "modification_time", "change_time", "birth_time")]
242241
#' \dontshow{setwd(.old_wd)}

0 commit comments

Comments
 (0)