Clean Contents of a Directory

util_clean_dir(dir, create_dir = TRUE, recursive = TRUE, force = TRUE)

Arguments

dir

Character string. Directory.

create_dir

Logical. If TRUE, creates an empty dir. If FALSE, dir and all its contents are deleted.

recursive

logical. Should directories be deleted recursively?

force

logical. Should permissions be changed (if possible) to allow the file or directory to be removed?

Author

Ivan Jacob Agaloos Pesigan

Examples

if (FALSE) { util_clean_dir(dir = MY_DIRECTORY) }