| is_dir_empty {fs} | R Documentation |
Check if a directory is empty
Description
This function checks whether a given directory is empty or not.
Usage
is_dir_empty(path)
Arguments
path |
A character string specifying the path to the directory to check. |
Value
A logical value. Returns TRUE if the directory is empty,
FALSE otherwise.
Examples
## Not run:
is_dir_empty("path/to/empty/directory") # Returns TRUE
is_dir_empty("path/to/non-empty/directory") # Returns FALSE
## End(Not run)
[Package fs version 2.1.0 Index]