Specify which files to include
Usage
file_spec(
path,
pattern = NULL,
format = c("binary", "text"),
recursive = TRUE,
ignore_case = TRUE,
all_files = FALSE
)
Arguments
- path
Path relative to the package root), for example,
"inst/"
.- pattern
Regular expression for matching the file names.
- format
File format type, one of
"binary"
or"text"
.- recursive
List files in the sub-directories?
- ignore_case
Should pattern-matching be case-insensitive?
- all_files
List all files including the invisible ones?
Details
Most of the parameters are passed through list.files()
.
Examples
file_spec(
"R/",
pattern = "\\.R$", format = "text",
recursive = FALSE, ignore_case = TRUE, all_files = FALSE
)
#> -- File specification ----------------------------------------------------
#> - Relative path: "R/"
#> - Pattern: "\\.R$"
#> - Format: "text"
#> - Recursive: FALSE
#> - Ignore case: TRUE
#> - All files: FALSE