findFiles.Rd
Finds one or several files in multiple directories.
# S3 method for default
findFiles(pattern=NULL, paths=NULL, recursive=FALSE, firstOnly=TRUE, allFiles=TRUE, ...)
A regular expression file name pattern to match.
If TRUE
, subdirectories are recursively processed,
and not if FALSE
. Alternatively, the maximum recursive depth can
be specified as a non-negative numeric
, where FALSE
corresponds to
0L
depth and TRUE
corresponds +Inf
depth.
If TRUE
, the method returns as soon as a matching
file is found, otherwise not.
If FALSE
, files and directories starting with
a period will be skipped, otherwise not.
Arguments passed to list.files
().
Returns a vector
of the full pathnames of the files found.
The paths
argument may also contain paths specified as
semi-colon (";"
) separated paths, e.g.
"/usr/;usr/bin/;.;"
.
Recursive searching of directory structure is done breath-first in a lexicographic order.
Windows Shortcut links (*.lnk) are recognized and can be used
to imitate links to directories elsewhere.
For more details, see filePath
().