needs_update: Check if files need to be updated

View source: R/utils_file_io.R

needs_updateR Documentation

Check if files need to be updated

Description

Check if files need to be updated

Usage

needs_update(
  x,
  path = FALSE,
  threshold = lubridate::floor_date(Sys.time(), "day")
)

Arguments

x

(chr) file path to check last updated time

path

(lgl) whether x is a path and all files should be checked

threshold

The threshold time. If files have last modified times less than this time, they will be marked as needing an update.

Value

(tbl) with columns:

  • full_path The full path to the file(s)

  • basename The file(s) basename

  • last_updated The last updated time

  • threshold The threshold time for comparison

  • needs_update logical as to whether the file should be updated

See Also

Other file IO: col_types(), dep_read(), dep_write(), dir_fn(), dirs, ext(), file_fn(), is_filepath(), last_updated(), list.files2(), load_obj(), make_names(), mkpath(), move_files_to_folder(), object_fn(), object_write(), package_size(), write_dir_fn(), write_lines()


yogat3ch/UU documentation built on May 31, 2024, 10:14 p.m.