Retrieve the paths of directories within a given directory, optionally matching a pattern.

getPaths(dir = "/data", pattern = "", full.names = TRUE)

Arguments

dir

A character string representing the directory to search within. Default is "/data".

pattern

A character string representing the pattern to match. Default is an empty string.

full.names

A logical value indicating whether to return full names of the directories. Default is TRUE.

Value

A character vector of directory paths matching the pattern.