list_files: List the Files in a Stash or Directory/Folder

Description Usage Arguments Value

Description

When x is a character vector or a local_stash, then list_files behaves as an alias for list.files where x is passed to the path argument of list.files and the remaining matching arguments are passed as is with the default values of list_files where applicable. (If you do not define an argument, the default value for the argument as defined in list_files will be used and not the default as defined in list.files).

Usage

1
2
3
4
list_files(x = ".", pattern = NULL, all.files = FALSE,
  full.names = FALSE, recursive = FALSE, ignore.case = FALSE,
  include.dirs = !recursive, no.. = FALSE, match.file = TRUE,
  as.stash = TRUE, simplify = TRUE)

Arguments

x

A character vector or a stash.

pattern

Optional regex (regular expression). Only file names which match the regular expression will be returned.

all.files

Logical. If FALSE, only the names of visible files are returned. If TRUE, all file names will be returned. Not applicable when x is a ftp_stash or s3_stash.

full.names

Logical. If FALSE and recursive = FALSE, only the file names are returned. If FALSE and recursive = TRUE, sub-directory names will be prepended to the file names. If TRUE and x is a character vector or a local_stash, the full directory path is prepended to the file names to give a relative file path. If TRUE and x is a ftp_stash or s3_stash, then a fully resolvable URL will be returned. Not applicable when as.stash = TRUE.

recursive

Logical. Should the listing recurse into directories?

ignore.case

Logical. Should pattern-matching be case-insensitive?

include.dirs

Logical. If TRUE, then sub-directory names be included when recursive = TRUE, no effect when recursive = FALSE (sub-directory names will always be included).

no..

Logical. Should both "." and ".." be excluded from non-recursive listings? Not applicable when x is a ftp_stash or s3_stash.

match.file

Logical. If TRUE and x is a file stash, then the file name pattern will be extracted and used for pattern. Not applicable is x is not a stash object or is a directory.

as.stash

Logical. If TRUE, a list of stash objects will be returned. If FALSE, a character vector is returned.

Value

If as.stash = TRUE, a list of stash objects will be returned, matching the stash type of x. If x is a character vector then a list of local_stash objects are returned. If as.stash = FALSE, a character vector is returned. If there are no matching files, the list or character vector will be of length == 0.


jason-huling/rstash documentation built on May 18, 2019, 4:53 p.m.