Resolves the current and previous file paths from the configuration. If
current_file is set explicitly, it is used directly. Otherwise the
two most recently modified files in folder are used.
Arguments
- config
Named list. Merged configuration as returned by
load_config.
Examples
cfg_dir <- system.file("demonstrations/config", package = "dqcheckr")
cfg <- load_config("starwars_csv", config_dir = cfg_dir)
cfg$current_file <- system.file("demonstrations/data/starwars.csv",
package = "dqcheckr")
files <- detect_files(cfg)
files$current
#> [1] "/Library/Frameworks/R.framework/Versions/4.6/Resources/library/dqcheckr/demonstrations/data/starwars.csv"