This function only exists inside arrow dplyr queries, and it only is
valid when querying on a FileSystemDataset.
Details
To use filenames generated by this function in subsequent pipeline steps, you
must either call compute() or
collect() first. See Examples.
Examples
if (FALSE) {
open_dataset("nyc-taxi") %>% mutate(
file =
add_filename()
)
# To use a verb like mutate() with add_filename() we need to first call
# compute()
open_dataset("nyc-taxi") %>%
mutate(file = add_filename()) %>%
compute() %>%
mutate(filename_length = nchar(file))
}