Skip to content

Commit

Permalink
Update file_touch documentation
Browse files Browse the repository at this point in the history
Per #169, this _does_ create the file if it does not exist.
  • Loading branch information
jgaeb authored Jan 23, 2025
1 parent 8d40528 commit e4ff9bf
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions R/file.R
Original file line number Diff line number Diff line change
Expand Up @@ -227,16 +227,15 @@ file_move <- function(path, new_path) {

#' Change file access and modification times
#'
#' Unlike the touch POSIX utility this does not create the file if it does not
#' exist. Use [file_create()] to do this if needed.
#' Like the touch POSIX utility this will create the file if it does not
#' exist.
#'
#' @template fs
#'
#' @param access_time,modification_time The times to set, inputs will be
#' coerced to [POSIXct] objects.
#' @examples
#' \dontshow{.old_wd <- setwd(tempdir())}
#' file_create("foo")
#' file_touch("foo", "2018-01-01")
#' file_info("foo")[c("access_time", "modification_time", "change_time", "birth_time")]
#' \dontshow{setwd(.old_wd)}
Expand Down

0 comments on commit e4ff9bf

Please sign in to comment.