powered by
Function to check file create time and according the requirement to return check value
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]) })
Basename of files that need to be check, default is NULL and use the regular expression pattern to select files
Directory name of input files
Use regular expression to select files in files_dir
Logical indicating wheather to return files modification times
Logical indicating wheather to return file times check status
Function to check files time, default is all equal
# 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 DataLab