Consider using the camino crate for UTF-8 paths #5
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Rust's standard library represents file paths as
PathBufwhichDereftoPath. Individual path components are returned asOsStrslices. Neither of those types can be assumed to be a UTF-8&str, and as you doubtless have found, this is a pain in the ass for code which is not a file manager which must be able to operate on inconsistently-encoded directory trees.I think we can safely assume that Fipamo's directory trees will have only valid UTF-8 filenames. If that is the case, the
caminocrate makes it a lot easier to deal with UTF-8 filenames, since everything there is a&str.Gotcha. I'll give it a look.