Skip to content
Snippets Groups Projects
Commit 4aacda33 authored by Johannes Boog's avatar Johannes Boog
Browse files

[base] add path creation and cleaning function

parent 92645ed9
No related branches found
No related tags found
1 merge request!55[base] update package to OGS6.4.2
......@@ -480,3 +480,18 @@ make_abs_path <- function(file_path, ref_path, force=F){
return(file_path)
}
#' dir_make_overwrite
#' @description Creates a directory or cleans existing one at given path.
#' @param path String
#' @noRd
dir_make_overwrite <- function(path) {
if (dir.exists(path)) {
unlink(path, recursive = TRUE)
}
dir.create(path, recursive = TRUE)
return(invisible(TRUE))
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment