By definition, this means the directory contains a file with the same name (ignoring extension) as the directory.

is.idempotent_directory(dir)

Arguments

dir

character. The directory to check.

Value

TRUE or FALSE according as the directory is idempotent. There is no checking to ensure the directory exists.

Examples

not_run({ # If we have a directory foo containing foo.R, then is.idempotent_directory('foo') # is TRUE, otherwise it's FALSE. })