By definition, this means the directory contains a file with the same name (ignoring extension) as the directory.
is.idempotent_directory(dir)
dir | character. The directory to check. |
---|
TRUE
or FALSE
according as the directory is idempotent.
There is no checking to ensure the directory exists.
not_run({ # If we have a directory foo containing foo.R, then is.idempotent_directory('foo') # is TRUE, otherwise it's FALSE. })