findInFiles {findInFiles} | R Documentation |
Find pattern in files
Description
Find a pattern in some files. The functions findInFiles
and fif
are the same, and fifR(...)
is the same as
findInFiles(extensions = "R", ...)
.
Usage
findInFiles(
extensions,
pattern,
depth = NULL,
maxCountPerFile = NULL,
maxCount = NULL,
wholeWord = FALSE,
ignoreCase = FALSE,
extended = FALSE,
fixed = FALSE,
perl = FALSE,
includePattern = NULL,
excludePattern = NULL,
excludeFoldersPattern = NULL,
moreOptions = NULL,
root = ".",
output = "viewer",
elementId = NULL
)
fif(
extensions,
pattern,
depth = NULL,
maxCountPerFile = NULL,
maxCount = NULL,
wholeWord = FALSE,
ignoreCase = FALSE,
extended = FALSE,
fixed = FALSE,
perl = FALSE,
includePattern = NULL,
excludePattern = NULL,
excludeFoldersPattern = NULL,
moreOptions = NULL,
root = ".",
output = "viewer",
elementId = NULL
)
fifR(...)
Arguments
extensions |
extension(s) of the files to include in the search
(case-sensitive), e.g. |
pattern |
pattern to search for, a regular expression, e.g.
|
depth |
depth of the search, |
maxCountPerFile |
maximum number of results per file, |
maxCount |
maximum number of results, |
wholeWord |
logical, whether to match the whole pattern |
ignoreCase |
logical, whether to ignore the case |
extended |
logical, whether the pattern given in the |
fixed |
logical, whether the pattern given in the |
perl |
logical, whether the pattern given in the |
includePattern |
this argument is ignored if |
excludePattern |
a pattern or a vector of patterns; files and folders whose name matches this pattern or one of these patterns will be excluded from search |
excludeFoldersPattern |
a pattern or a vector of patterns; folders whose name matches this pattern or one of these patterns will be excluded from search |
moreOptions |
additional options passed to the |
root |
path to the root directory to search from |
output |
one of |
elementId |
a HTML id, usually useless |
... |
arguments other than |
Value
A tibble if output="tibble"
, otherwise a
htmlwidget
object.
Examples
library(findInFiles)
folder <- system.file("example", package = "findInFiles")
findInFiles("R", "function", root = folder)
findInFiles("R", "function", root = folder, output = "tibble")
fif <- findInFiles("R", "function", root = folder, output = "viewer+tibble")
FIF2tibble(fif)
FIF2dataframe(fif)
fif
folder <- system.file("www", "shared", package = "shiny")
findInFiles(
"css", "color", root = folder,
excludePattern = c("*.min.css", "selectize*", "shiny*")
)