platform/
platform.rs

1use typed_path::PlatformPath;
2
3fn main() {
4    // You can create the path like normal, but it is a distinct encoding from Unix/Windows
5    let path = PlatformPath::new("some/path");
6
7    // The path will still behave like normal and even report its underlying encoding
8    assert_eq!(path.has_unix_encoding(), cfg!(unix));
9    assert_eq!(path.has_windows_encoding(), cfg!(windows));
10
11    // It can still be converted into specific platform paths
12    let _ = path.with_unix_encoding();
13    let _ = path.with_windows_encoding();
14}