Sanitizes file name (without the extension part).
Ported and modified from fs::path_sanitize()
.
Examples
x <- " znul/zzz.z>z/\\z "
paste0(sanitize_filename(x), ".rds")
#> [1] "znul-zzz.z-z--z.rds"
Sanitizes file name (without the extension part).
Ported and modified from fs::path_sanitize()
.
x <- " znul/zzz.z>z/\\z "
paste0(sanitize_filename(x), ".rds")
#> [1] "znul-zzz.z-z--z.rds"