add record existence checks in read_all
This commit is contained in:
@@ -42,9 +42,8 @@ fetch_batch <- function(offset, download_dir) {
|
||||
#'
|
||||
#' @export
|
||||
fetch_all <- function(download_dir="inst/records/", create=FALSE) {
|
||||
# check if download_dir path is a directory path
|
||||
if (str_sub(download_dir, -1) != .Platform$file.sep)
|
||||
download_dir <- str_c(download_dir, .Platform$file.sep)
|
||||
# append file separator if needed
|
||||
download_dir <- make_directory_path(download_dir)
|
||||
|
||||
check_directory(download_dir, create)
|
||||
cat("Fetching all available records from bundestag.de. This may take a while ...\n")
|
||||
|
||||
Reference in New Issue
Block a user