catalogr: Catalog a directory

View source: R/catalogr.R

catalogrR Documentation

Catalog a directory

Description

Catalog a directory of files

Usage

catalogr(
  dir = getwd(),
  fileformat = list(.R = "#>", .sql = "-->"),
  write_yaml = TRUE,
  yaml_filepath = file.path(getwd(), "catalogr.yaml"),
  recursive = TRUE
)

Arguments

dir

current working directory

fileformat

list with the keys as file type and a value with the comment token. These are the only files read by the package. By default R and SQL files are supported.

write_yaml

boolen value, if FALSE then the function returns a list object

yaml_filepath

if 'write_yaml' is TRUE, this specifies the filepath and filename to store the file in.

recursive

recursively follow all directories starting from the current directory

Examples

# Catalog all .R files in the current working directory
catalogr()
# Catalog R and SQL files.
# Catalogs the metadata available
catalogr(fileformat = list(".R" = "#>", ".sql" = "-->"))

sada1993/catalogr documentation built on April 15, 2022, 3:32 a.m.