check_directory_structure {pcutils} | R Documentation |
Check if a directory structure matches the expected structure
Description
This function compares the actual directory structure with a predefined expected structure
and returns TRUE
if they match, otherwise FALSE
. If verbose
is TRUE
, it prints
detailed information about missing or extra files/directories.
Usage
check_directory_structure(
root_path,
expected_structure,
only_missing = TRUE,
verbose = FALSE
)
Arguments
root_path |
A character string specifying the root directory to check. |
expected_structure |
A character vector specifying the expected directory structure. Each element should be a relative path (e.g., "data/raw"). |
only_missing |
Only check the missing files/directories. |
verbose |
A logical value. If |
Value
A logical value: TRUE
if the directory structure matches the expected structure,
otherwise FALSE
.
[Package pcutils version 0.2.8 Index]