Skip to content

Commit

Permalink
Update helpers.R
Browse files Browse the repository at this point in the history
  • Loading branch information
bpbond committed May 7, 2024
1 parent 61af273 commit aab1352
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions synoptic/helpers.R
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ write_to_folders <- function(x, root_dir, data_level, site, plot,
reset <- function(root = here::here("synoptic/data_TEST")) {
message("root is ", root)

remove_files_folders <- function(dir, pat = "*.csv", rec = TRUE) {
remove_files_folders <- function(dir, pat = "(pdf|csv)$", rec = TRUE) {
items <- list.files(file.path(root, dir), recursive = rec,
pattern = pat,
full.names = TRUE)
Expand All @@ -203,7 +203,6 @@ reset <- function(root = here::here("synoptic/data_TEST")) {
items <- items[basename(items) != "README.md"]
message("Removing ", length(items), " directories in ", dir)
lapply(items, file.remove)

}

remove_files_folders("L0/")
Expand Down

0 comments on commit aab1352

Please sign in to comment.