pub struct PathLocation { /* private fields */ }Expand description
Information about the disk/volume a specific file path resides on.
Returned by resolve. Contains the mount point info and the
path relative to the mount point.
Implementations§
Source§impl PathLocation
impl PathLocation
Sourcepub fn mount_info(&self) -> &MountPoint
pub fn mount_info(&self) -> &MountPoint
Returns the mount point information.
Sourcepub fn mount_point(&self) -> &Path
pub fn mount_point(&self) -> &Path
Returns the mount point of the disk/volume.
Sourcepub fn canonical_path(&self) -> &Path
pub fn canonical_path(&self) -> &Path
Returns the canonicalized absolute path.
This is the result of std::fs::canonicalize on the original input path.
Sourcepub fn relative_path(&self) -> &Path
pub fn relative_path(&self) -> &Path
Returns the path relative to the mount point.
Sourcepub fn is_ejectable(&self) -> bool
pub fn is_ejectable(&self) -> bool
Returns true if the volume is ejectable or removable (e.g. USB drives,
SD cards, external SSDs).
Trait Implementations§
Source§impl Clone for PathLocation
impl Clone for PathLocation
Source§fn clone(&self) -> PathLocation
fn clone(&self) -> PathLocation
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PathLocation
impl Debug for PathLocation
Source§impl PartialEq for PathLocation
impl PartialEq for PathLocation
impl Eq for PathLocation
impl StructuralPartialEq for PathLocation
Auto Trait Implementations§
impl !Freeze for PathLocation
impl RefUnwindSafe for PathLocation
impl Send for PathLocation
impl Sync for PathLocation
impl Unpin for PathLocation
impl UnsafeUnpin for PathLocation
impl UnwindSafe for PathLocation
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