empty_stage() retrieves the pipeline stage that produced an empty
seekr_match result returned by seek() or seekr().
Empty results can happen at different stages of the pipeline:
"input": the inputpathwas empty."list": no files were found bylist_files()."filter": all files were excluded byfilter_files()."match": files were searched, but no match was found.
For non-empty results, empty_stage() returns NULL.
Arguments
- x
A
seekr_matchobject, returned by eitherseek()orseekr().
Value
Either NULL for non-empty results, or one of "input", "list",
"filter", or "match" for empty results.
Examples
ext_path <- system.file("extdata", package = "seekr")
x <- seek("pattern_that_does_not_exist", path = ext_path)
empty_stage(x)
#> [1] "match"
