path_sanitize() removes the following:
Unix reserved filenames (
Trailing periods and spaces (invalid on Windows)
Windows reserved filenames (
The resulting string is then truncated to 255 bytes in length
path_sanitize(filename, replacement = "")
A character vector to be sanitized.
A character vector used to replace invalid characters.
https://www.npmjs.com/package/sanitize-filename, upon which this function is based.
# potentially unsafe string str <- "~/.\u0001ssh/authorized_keys" path_sanitize(str)#>  "~.sshauthorized_keys"path_sanitize("..")#>  ""