files_in_directory: List the files in a directory/folder

View source: R/read-generic.R

files_in_directoryR Documentation

List the files in a directory/folder

Description

Wrapper around list.files()

Usage

files_in_directory(path = ".", pattern = ".csv", recursive = TRUE)

Arguments

path

a character vector of full path names; the default corresponds to the working directory, getwd(). Tilde expansion (see path.expand) is performed. Missing values will be ignored. Elements with a marked encoding will be converted to the native encoding (and if that fails, considered non-existent).

pattern

an optional regular expression. Only file names which match the regular expression will be returned.

recursive

logical. Should the listing recurse into directories?

Value

Returns a character vector containing the names of the files in the specified directory.


josegallegos07/aceR documentation built on June 27, 2022, 10:25 a.m.