list_dirs: List directories

Description Usage Arguments Value

View source: R/utils.R

Description

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

Usage

1
2
3
4
5
6
7
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 Oct. 18, 2021, 1:08 a.m.