sn_check_data_folder: Checks if db folder exists, if not returns an informative...

View source: R/db.R

sn_check_data_folderR Documentation

Checks if db folder exists, if not returns an informative message

Description

Checks if db folder exists, if not returns an informative message

Usage

sn_check_data_folder(path = NULL)

Value

If the cache folder exists, returns TRUE. Otherwise throws an error.

Examples


# If cache folder does not exist, it throws an error
tryCatch(tw_check_cache_folder(),
  error = function(e) {
    return(e)
  }
)

# Create cache folder
sn_set_data_folder(path = fs::path(
  tempdir(),
  "sn_data_folder"
))
sn_create_data_folder(ask = FALSE)

sn_check_data_folder()

giocomai/streetnamer documentation built on Oct. 14, 2023, 6:27 p.m.