rust/library/std/src/sys/path
Ayush Singh 1107382a18
path: Move is_absolute check to sys::path
I am working on fs support for UEFI [0], which similar to windows has prefix
components, but is not quite same as Windows. It also seems that Prefix
is tied closely to Windows and cannot really be extended [1].

This PR just tries to remove coupling between Prefix and absolute path
checking to allow platforms to provide there own implementation to check
if a path is absolute or not.

I am not sure if any platform other than windows currently uses Prefix,
so I have kept the path.prefix().is_some() check in most cases.

[0]: https://github.com/rust-lang/rust/pull/135368
[1]: https://github.com/rust-lang/rust/issues/52331#issuecomment-2492796137

Signed-off-by: Ayush Singh <ayush@beagleboard.org>
2025-01-13 11:52:03 +05:30
..
windows library: consistently use American spelling for 'behavior' 2024-10-25 12:02:47 +02:00
mod.rs std: move path into sys 2024-02-08 12:51:35 +01:00
sgx.rs path: Move is_absolute check to sys::path 2025-01-13 11:52:03 +05:30
unix.rs path: Move is_absolute check to sys::path 2025-01-13 11:52:03 +05:30
unsupported_backslash.rs path: Move is_absolute check to sys::path 2025-01-13 11:52:03 +05:30
windows.rs path: Move is_absolute check to sys::path 2025-01-13 11:52:03 +05:30