Filesystem path target extended attributes store extra, customizable, small bits of info. For example, author name, file character encoding, short comments, security status, etc. Methods are provided to list, extract and work with these attributes.
# Create a temp file for the example tf <- tempfile(fileext = ".csv") write.csv(mtcars, tf) # has attributes? (shld be FALSE) has_xattrs(tf)#> [1] FALSE#> character(0)# set an attribute set_xattr(tf, "is.rud.setting.a", "first attribut") get_xattr(tf, "is.rud.setting.a")#> [1] "first attribut"#> [1] 14#> [1] TRUE#> [1] "second attribute"#> [1] 16# overwrite an attribute set_xattr(tf, "is.rud.setting.a", "first attribute") get_xattr(tf, "is.rud.setting.a")#> [1] "first attribute"#> [1] 15#> [1] "is.rud.setting.a" "is.rud.setting.b"#> # A tibble: 2 x 3 #> name size contents #> <chr> <dbl> <list> #> 1 is.rud.setting.a 15 <raw [15]> #> 2 is.rud.setting.b 16 <raw [16]>#> character(0)# cleanup unlink(tf)