list_files: Function to list files in a directory.

View source: R/list_files.R

list_filesR Documentation

Function to list files in a directory.

Description

list_files is a wrapper for list.files but full.names has the default value of TRUE.

Usage

list_files(
  path = ".",
  pattern = NULL,
  all.files = FALSE,
  full.names = TRUE,
  recursive = FALSE,
  ignore.case = FALSE,
  include.dirs = FALSE,
  no.. = FALSE,
  fs_path = FALSE,
  verbose = FALSE
)

Arguments

path

Path of directory.

pattern

Pattern for regular expression matching.

all.files

Logical to force the return of hidden files.

full.names

Logical to force the full file path to be returned. The default is TRUE.

recursive

Logical to operate recursively.

ignore.case

Logical for pattern.

include.dirs

Should sub-directory names be included?

no..

Should "." and ".." be dropped from return?

fs_path

Should the return be an fs path? Useful for tidying paths and colour printing.

verbose

Should the function give messages?

Value

Vector of file names or paths.

Author(s)

Stuart K. Grange


skgrange/threadr documentation built on May 11, 2024, 12:16 p.m.