list_dirs: List directories

View source: R/utils.R

list_dirsR Documentation

List directories

Description

Wrapper around list.dirs() but includes maxdepth and pattern arguments and removes full.names argument, always return full names.

Usage

list_dirs(
  path = ".",
  full.names = TRUE,
  recursive = FALSE,
  maxdepth = 1,
  pattern
)

Arguments

path

Same as list.dirs().

full.names

Same as list.dirs().

recursive

Same as list.dirs().

maxdepth

Integer (default = 1) maximum depth to search.

pattern

Optional character (default is missing) regex pattern match on directory name.

Value

Character vector of paths to matched directories.


NMproject documentation built on Sept. 30, 2022, 1:06 a.m.