Lists all files under a folder recursively and guesses the file format type (text or binary) based on the file extension.

file_auto(path)

Arguments

path

The directory's relative path (relative to the package root), for example, "inst/".

Value

A list of file specifications.

Specification

The contents of this section are shown in PDF user manual only.

Examples

file_auto("inst/")
#> [[1]]
#>
#> ── File specification ──────────────────────────────────────────────────────────
#> • Relative path: inst/
#> • Pattern: #> "\\.R$|\\.r$|\\.s$|\\.Rd$|\\.rd$|\\.svg$|\\.c$|\\.h$|\\.cpp$|\\.hpp$|\\.hxx$|\\.hh$|\\.f$|\\.f90$|\\.f95$|\\.f03$|\\.Rmd$|\\.md$|\\.Rnw$|\\.tex$|\\.bib$|\\.Rproj$|\\.dcf$|\\.yml$|\\.yaml$|\\.csv$|\\.tsv$|\\.txt$|\\.html$|\\.css$|\\.js$|\\.xml$|\\.rtf$"
#> • Format: "text"
#> • Recursive: TRUE
#> • Ignore case: TRUE
#> • All files: TRUE
#> #> [[2]]
#>
#> ── File specification ──────────────────────────────────────────────────────────
#> • Relative path: inst/
#> • Pattern: #> "\\.rda$|\\.rds$|\\.RData$|\\.jpg$|\\.jpeg$|\\.pdf$|\\.png$|\\.bmp$|\\.gif$|\\.tiff$|\\.emf$|\\.ico$|\\.webp$|\\.eps$|\\.o$|\\.so$|\\.docx$|\\.xlsx$|\\.pptx$|\\.doc$|\\.xls$|\\.ppt$|\\.sas7bdat$|\\.sas7bcat$|\\.xpt$|\\.xpt5$|\\.xpt8$"
#> • Format: "binary"
#> • Recursive: TRUE
#> • Ignore case: TRUE
#> • All files: TRUE
#>