Find files based upon regular expression searching IMPORTANT - a Directory is NOT a file. (for most instances of file systems)
Usage
find_files(
file_regx = ".R",
path = ".",
recursive = TRUE,
exclude_files = NULL,
exclude_dirs = NULL
)
Examples
find_files(file_regx = ".*", ## any file name
path = ".*", # the current directory and all subdirectories
recursive = FALSE, # don't recurse
exclude_files = ".*utility.*", # exclude "utility" anywhere in basename
exclude_dirs = "\\<tmp\\>|/tmp/|/tmp\\>|\\<tmp/" # exclude any directory named "tmp", or subdirs
)
#> character(0)