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

getDirs(dir = "/data", pattern = "", full.names = FALSE)

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 FALSE.

Value

A character vector of directory names matching the pattern.