add checks to read/write csv and refactor
This commit is contained in:
@@ -19,6 +19,13 @@ check_directory <- function(path, create=F) {
|
||||
}
|
||||
}
|
||||
|
||||
stop_dir_not_creatable <- function(cond) {
|
||||
# currently this has call: dir.create(download_dir)
|
||||
# do we want to change this to fetch_all(...) ?
|
||||
cond$message <- "Directory does not exist and can't be created. Probably because the path is not writeable."
|
||||
stop(cond)
|
||||
}
|
||||
|
||||
# appends a file seperator at end of path if needed
|
||||
make_directory_path <- function(path) {
|
||||
if (!str_ends(path, .Platform$file.sep)) str_c(path, .Platform$file.sep)
|
||||
|
||||
Reference in New Issue
Block a user