ngstk (version 0.1.1.1)

get_files_ctime: Function to check file create time and according the requirement to return check value

Description

Function to check file create time and according the requirement to return check value

Usage

get_files_ctime(input_files = NULL, files_dir = NULL, pattern = ".*.txt",
  return_ctime = TRUE, return_check = TRUE,
  check_time_fun = function(files_ctime) {     all(files_ctime ==
  files_ctime[1]) })

Arguments

input_files

Basename of files that need to be check, default is NULL and use the regular expression pattern to select files

files_dir

Directory name of input files

pattern

Use regular expression to select files in files_dir

return_ctime

Logical indicating wheather to return files modification times

return_check

Logical indicating wheather to return file times check status

check_time_fun

Function to check files time, default is all equal

Examples

Run this code
# NOT RUN {
file_a <- tempfile()
file_b <- tempfile()
file.create(c(file_a, file_b))
get_files_ctime(input_files = c(file_a, file_b), return_ctime = TRUE)
# }

Run the code above in your browser using DataCamp Workspace