List files and directories in current directory in matrix format. Each row is preceded by a row number.
f(path = ".", pattern = NULL, all.files = FALSE,
full.names = FALSE, recursive = FALSE, ignore.case = FALSE)
A character vector of full path names; the default corresponds to the working directory getwd()
. Missing values will be ignored.
An optional regular expression. Only file names which match the regular expression will be returned.
Logical. If FALSE
, only the names of visible files are returned. If TRUE
, all file names will be returned.
Logical. If TRUE
, the directory path is prepended to the file names. If FALSE
, only the file names are returned.
Logical. Should the listing recurse into directories?
Logical. Should pattern-matching be case-insensitive?
A matrix containing the names of the files and directories, preceded by a row number, in the specified directories. If a path does not exist or is not a directory or is unreadable it is skipped, with a warning.
The files are sorted in alphabetical order, on the full path if full.names = TRUE
. Directories are included only if recursive = FALSE
.