Lists files inside a given directory.
Arguments
- path
(
character(n))
Character vector of one or more paths.- max_files
(
integer(1))
Max files returned.- type
(
character(n))
File type(s) to return (e.g. any, file, directory). Seefs::dir_info. Symlinks are followed and classified by their target, so a symlink to a file counts as afile(with the target's size and modification time); broken symlinks are dropped.
Examples
d <- system.file("R", package = "nemo")
x <- list_files_dir(d)
# symlinked files are included
d2 <- fs::dir_create(tempfile())
f <- fs::file_create(file.path(d2, "real.tsv"))
fs::link_create(f, file.path(d2, "link.tsv"))
x2 <- list_files_dir(d2)
