Skip to contents

Tool: List files

Usage

btw_tool_list_files(
  path = getwd(),
  type = c("any", "file", "directory"),
  regexp = ""
)

Arguments

path

Path to a directory or file for which to get information. The path must be in the current working directory. If path is a directory, we use fs::dir_info() to list information about files and directories in path (use type to pick only one or the other). If path is a file, we show information about that file.

type

File type(s) to return, one of "any" or "file" or "directory".

regexp

A regular expression (e.g. [.]csv$) passed on to grep() to filter paths.

Value

Returns a character table of file information.