Get the chunk IDs and files names

get_chunk_ids(df, ..., full.names = FALSE, strip_extension = TRUE)

Arguments

df

a disk.frame

...

passed to list.files

full.names

If TRUE returns the full path to the file, Defaults to FALSE

strip_extension

If TRUE then the file extension in the chunk_id is removed. Defaults to TRUE

Examples

cars.df = as.disk.frame(cars)

# return the integer-string chunk IDs
get_chunk_ids(cars.df)
#> [1] "1" "2" "3" "4" "5" "6"

# return the file name chunk IDs
get_chunk_ids(cars.df, full.names = TRUE)
#> [1] "C:\\Users\\RTX2080\\AppData\\Local\\Temp\\RtmpCo1OFr\\file2b641215571a.df/1.fst"
#> [2] "C:\\Users\\RTX2080\\AppData\\Local\\Temp\\RtmpCo1OFr\\file2b641215571a.df/2.fst"
#> [3] "C:\\Users\\RTX2080\\AppData\\Local\\Temp\\RtmpCo1OFr\\file2b641215571a.df/3.fst"
#> [4] "C:\\Users\\RTX2080\\AppData\\Local\\Temp\\RtmpCo1OFr\\file2b641215571a.df/4.fst"
#> [5] "C:\\Users\\RTX2080\\AppData\\Local\\Temp\\RtmpCo1OFr\\file2b641215571a.df/5.fst"
#> [6] "C:\\Users\\RTX2080\\AppData\\Local\\Temp\\RtmpCo1OFr\\file2b641215571a.df/6.fst"

# return the file name chunk IDs with file extension
get_chunk_ids(cars.df, strip_extension = FALSE)
#> [1] "1.fst" "2.fst" "3.fst" "4.fst" "5.fst" "6.fst"

# clean up cars.df
delete(cars.df)