Skip to main content

path_bytes

Function path_bytes 

Source
pub fn path_bytes(path: &Path) -> Vec<u8> ⓘ
Expand description

The path’s bytes as coven records them. On Unix they are the path’s own bytes. On Windows they are its UTF-16 units in WTF-8: UTF-8, with each unpaired surrogate written as the three bytes UTF-8 would give its code point. Rust’s OsStr::as_encoded_bytes holds the same bytes today, but its encoding is unspecified and not to be stored, so coven writes them itself. A path that is valid Unicode is its UTF-8 on every platform.