Updates the regular expression and/or recurse argument that were provided
when a directory was configured (using batch_config()
).
batch_reconfig_fileset(path, regexp = NULL, recurse = NULL)
An invisible character vector of the paths to the files remaining to be processed.
batch_reconfig_fileset()
is useful for including or excluding particular files.
It should be noted that batch_reconfig_fun()
does not alter the
configuration time.
In order to process previously failed files batch_run()
should be called with failed = NA
or failed = TRUE
.
path <- tempdir()
write.csv(mtcars, file.path(path, "file1.csv"))
batch_config(function(x) TRUE, path, regexp = "[.]csv$")
batch_config_read(path)
#> $time
#> [1] "2024-11-01 16:04:26 UTC"
#>
#> $regexp
#> [1] "[.]csv$"
#>
#> $recurse
#> [1] FALSE
#>
#> $fun
#> function (x)
#> TRUE
#> <environment: 0x563db72f5128>
#>
#> $dots
#> list()
#>
batch_reconfig_fileset(path, regexp = "file\\d+[.]csv$")
batch_config_read(path)
#> $time
#> [1] "2024-11-01 16:04:26 UTC"
#>
#> $regexp
#> [1] "file\\d+[.]csv$"
#>
#> $recurse
#> [1] FALSE
#>
#> $fun
#> function (x)
#> TRUE
#> <environment: 0x563db8257d70>
#>
#> $dots
#> list()
#>
batch_cleanup(path, force = TRUE, remaining = TRUE)
unlink(file.path(path, "file1.csv"))