Updates the regular expression and/or recurse argument that were provided
when a directory was configured (using batch_config()
).
Details
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
.
Examples
path <- tempdir()
write.csv(mtcars, file.path(path, "file1.csv"))
batch_config(function(x) TRUE, path, regexp = "[.]csv$")
batch_config_read(path)
#> $time
#> [1] "2025-01-14 21:15:55 UTC"
#>
#> $regexp
#> [1] "[.]csv$"
#>
#> $recurse
#> [1] FALSE
#>
#> $fun
#> function (x)
#> TRUE
#> <environment: 0x55eec81088a8>
#>
#> $dots
#> list()
#>
batch_reconfig_fileset(path, regexp = "file\\d+[.]csv$")
batch_config_read(path)
#> $time
#> [1] "2025-01-14 21:15:55 UTC"
#>
#> $regexp
#> [1] "file\\d+[.]csv$"
#>
#> $recurse
#> [1] FALSE
#>
#> $fun
#> function (x)
#> TRUE
#> <environment: 0x55eec667fa98>
#>
#> $dots
#> list()
#>
batch_cleanup(path, force = TRUE, remaining = TRUE)
unlink(file.path(path, "file1.csv"))