pub struct Path(/* private fields */);
Expand description
A borrowed path type.
The implementation is very similar to the standard library’s std::path::Path
.
However, this implementation is more lightweight and allows for std-less usage.
Implementations§
Source§impl Path
impl Path
pub const ROOT: &'static Path
pub const EMPTY: &'static Path
Sourcepub const SYSTEM: &'static Path
pub const SYSTEM: &'static Path
Contains the OS core, including the kernel, init system, and critical drivers. Prevents modification by regular users.
Sourcepub const DEVICES: &'static Path
pub const DEVICES: &'static Path
Stores system-wide settings in a structured format (e.g., JSON, TOML).
Sourcepub const CONFIGURATION: &'static Path
pub const CONFIGURATION: &'static Path
Hardware devices, symlinks for human-friendly names.
Sourcepub const SHARED_CONFIGURATION: &'static Path
pub const SHARED_CONFIGURATION: &'static Path
Contains the shared configurations between applications.
Sourcepub const SHARED_DATA: &'static Path
pub const SHARED_DATA: &'static Path
Shared data between binaries.
Sourcepub const BINARIES: &'static Path
pub const BINARIES: &'static Path
Contains the system’s binaries, including the shell and other executables.
Sourcepub const USERS: &'static Path
pub const USERS: &'static Path
Contains the user’s data, including documents, downloads, and other files.
Sourcepub const fn from_str(path: &str) -> &Path
pub const fn from_str(path: &str) -> &Path
§Safety
The caller must ensure that the string is a valid path string.
Sourcepub fn new<S: AsRef<str> + ?Sized>(path: &S) -> &Path
pub fn new<S: AsRef<str> + ?Sized>(path: &S) -> &Path
§Safety
The caller must ensure that the string is a valid path string.