dir2 {hutils}R 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.


[Package hutils version 1.8.1 Index]