pub struct PosixPath { /* private fields */ }Expand description
A path for Posix systems.
Trait Implementations§
Source§impl<'a> From<&'a PosixPath> for UnifiedPath<'a>
impl<'a> From<&'a PosixPath> for UnifiedPath<'a>
Source§impl Ord for PosixPath
impl Ord for PosixPath
Source§impl ParsablePath for PosixPath
impl ParsablePath for PosixPath
Source§const PRIMARY_COMPONENT_SEPARATOR: char = '/'
const PRIMARY_COMPONENT_SEPARATOR: char = '/'
The primary component separator. Read more
Source§const SECONDARY_COMPONENT_SEPARATOR: Option<char> = None
const SECONDARY_COMPONENT_SEPARATOR: Option<char> = None
The secondary component separator. Read more
Source§const EXTENSION_SEPARATOR: char = '.'
const EXTENSION_SEPARATOR: char = '.'
The extension separator.
Source§const DRIVE_SEPARATOR: Option<char> = None
const DRIVE_SEPARATOR: Option<char> = None
The drive separator.
Source§fn as_string_mut(&mut self) -> &mut String
fn as_string_mut(&mut self) -> &mut String
Returns a mutable reference to the path as a string.
Source§const COMPONENT_SEPARATORS: &'static [char] = _
const COMPONENT_SEPARATORS: &'static [char] = _
The component separators. Read more
Source§fn split_first_lexical(path: &str) -> (&str, Option<(&str, &str)>)
fn split_first_lexical(path: &str) -> (&str, Option<(&str, &str)>)
Returns the first component of the path and the rest of the path in a lexical way.
That means,
.. and . are not resolved or even considered.Source§fn split_first_component(
s: &str,
progressed: bool,
) -> (Option<Component<'_>>, Option<&str>)
fn split_first_component( s: &str, progressed: bool, ) -> (Option<Component<'_>>, Option<&str>)
Returns the first component of the path and the rest of the path.
Source§fn split_last_lexical(path: &str) -> (Option<(&str, &str)>, &str)
fn split_last_lexical(path: &str) -> (Option<(&str, &str)>, &str)
Returns the parent of the given path and the last component of the path in a lexical way.
That means,
.. and . are not resolved or even considered.Source§fn split_last_component(
s: &str,
_: bool,
) -> (Option<&str>, Option<Component<'_>>)
fn split_last_component( s: &str, _: bool, ) -> (Option<&str>, Option<Component<'_>>)
Returns the parent of the path and the last component of the path.
Source§fn split_last(s: &str) -> (Option<&str>, Option<&str>)
fn split_last(s: &str) -> (Option<&str>, Option<&str>)
Returns the parent of the path and the last component of the path.
Source§fn file_name(s: &str) -> Option<&str>
fn file_name(s: &str) -> Option<&str>
Returns the last component of the path, if there is one.
Source§fn join_in_place(parent: &mut String, child: &str)
fn join_in_place(parent: &mut String, child: &str)
Joins the given path with the parent in place.
Source§fn split_extension(s: &str) -> (&str, Option<&str>)
fn split_extension(s: &str) -> (&str, Option<&str>)
Returns the file stem and extension of the path.
Source§fn with_extension(path: &str, ext: &str) -> String
fn with_extension(path: &str, ext: &str) -> String
Replace the extension of the path with the given extension in place.
Source§fn split_driver(path: &str) -> (Option<&str>, &str)
fn split_driver(path: &str) -> (Option<&str>, &str)
Returns the driver of the path and the rest of the path.
Source§fn is_absolute(path: &str) -> bool
fn is_absolute(path: &str) -> bool
Returns whether the path is absolute.
Source§impl PartialOrd for PosixPath
impl PartialOrd for PosixPath
impl Eq for PosixPath
impl StructuralPartialEq for PosixPath
Auto Trait Implementations§
impl Freeze for PosixPath
impl RefUnwindSafe for PosixPath
impl Send for PosixPath
impl Sync for PosixPath
impl Unpin for PosixPath
impl UnwindSafe for PosixPath
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<P> PurePath for P
impl<P> PurePath for P
Source§fn join_in_place(&mut self, path: &P)
fn join_in_place(&mut self, path: &P)
Joins the given path in place.
Source§fn is_absolute(&self) -> bool
fn is_absolute(&self) -> bool
Returns whether the path is absolute.
Source§fn components(&self) -> impl DoubleEndedIterator
fn components(&self) -> impl DoubleEndedIterator
Returns the components of the path.