get_files_ctime: Function to check file create time and according the...

Description Usage Arguments Examples

View source: R/log.R

Description

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

Usage

1
2
3
4
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

1
2
3
4
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)

ngstk documentation built on May 2, 2019, 9:19 a.m.