File: findFiles.Rd

package info (click to toggle)
r-cran-r.utils 2.13.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,864 kB
  • sloc: sh: 18; makefile: 6
file content (65 lines) | stat: -rw-r--r-- 2,174 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Do not modify this file since it was automatically generated from:
% 
%  findFiles.R
% 
% by the Rdoc compiler part of the R.oo package.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\name{findFiles}
\alias{findFiles.default}
\alias{findFiles}

\title{Finds one or several files in multiple directories}

\description{
 Finds one or several files in multiple directories.
}

\usage{
\method{findFiles}{default}(pattern=NULL, paths=NULL, recursive=FALSE, firstOnly=TRUE, allFiles=TRUE, ...)
}

\arguments{
 \item{pattern}{A regular expression file name pattern to match.}
 \item{paths}{A \code{\link[base]{character}} \code{\link[base]{vector}} of paths to be searched.}
  \item{recursive}{If \code{\link[base:logical]{TRUE}}, subdirectories are recursively processed,
   and not if \code{\link[base:logical]{FALSE}}.  Alternatively, the maximum recursive depth can
   be specified as a non-negative \code{\link[base]{numeric}}, where \code{\link[base:logical]{FALSE}} corresponds to
   \code{0L} depth and \code{\link[base:logical]{TRUE}} corresponds \code{+Inf} depth.}
 \item{firstOnly}{If \code{\link[base:logical]{TRUE}}, the method returns as soon as a matching
   file is found, otherwise not.}
 \item{allFiles}{If \code{\link[base:logical]{FALSE}}, files and directories starting with
   a period will be skipped, otherwise not.}
 \item{...}{Arguments passed to \code{\link[base]{list.files}}().}
}

\value{
 Returns a \code{\link[base]{vector}} of the full pathnames of the files found.
}

\section{Search path}{
  The \code{paths} argument may also contain paths specified as
  semi-colon (\code{";"}) separated paths, e.g.
  \code{"/usr/;usr/bin/;.;"}.
}

\section{Recursive searching}{
  Recursive searching of directory structure is done breath-first
  in a lexicographic order.
}

\section{Windows Shortcut links}{
  Windows Shortcut links (*.lnk) are recognized and can be used
  to imitate links to directories elsewhere.
  For more details, see \code{\link{filePath}}().
}

\author{Henrik Bengtsson}




\keyword{file}
\keyword{IO}
\keyword{internal}