dir2: List many files

View source: R/dir2.R

dir2R Documentation

List many files

Description

(Windows only) Same as list.files but much faster.

Present since v1.4.0.

Usage

dir2(
  path = ".",
  file_ext = NULL,
  full.names = TRUE,
  recursive = TRUE,
  pattern = NULL,
  fixed = FALSE,
  perl = TRUE && missing(fixed) && !fixed,
  ignore.case = FALSE,
  invert = FALSE,
  .dont_use = FALSE
)

Arguments

path

A string representing the trunk path to search within.

file_ext

A string like '*.txt' or '.csv' to limit the result to files with that extension.

full.names

TRUE by default.

recursive

TRUE by default.

pattern, perl, ignore.case, fixed, invert

As in grep but with different defaults. Used to filter files with extension file_ext.

.dont_use

Only used for tests to simulate non-Windows systems.

Value

The same as list.files, a character vector of files sought.


hutils documentation built on April 13, 2022, 5:23 p.m.