pub enum DirOrFile {
Dir(PathBuf),
File(PathBuf),
}
Available on crate feature
v1
only.Expand description
Specifies whether an input path is a directory or a file (since this distinction can’t be made from the filename alone)
Variants§
Implementations§
Source§impl DirOrFile
impl DirOrFile
Sourcepub fn get_path_buf(&self) -> &PathBuf
pub fn get_path_buf(&self) -> &PathBuf
Returns the PathBuf
of the DirOrFile
Sourcepub fn components(&self) -> Vec<String>
pub fn components(&self) -> Vec<String>
Returns all the “Normal” components of the PathBuf, note that non-normal (such as “.”, symlinks, etc. components) are ignored
Trait Implementations§
Source§impl Ord for DirOrFile
impl Ord for DirOrFile
Source§impl PartialOrd for DirOrFile
impl PartialOrd for DirOrFile
impl Eq for DirOrFile
impl StructuralPartialEq for DirOrFile
Auto Trait Implementations§
impl Freeze for DirOrFile
impl RefUnwindSafe for DirOrFile
impl Send for DirOrFile
impl Sync for DirOrFile
impl Unpin for DirOrFile
impl UnwindSafe for DirOrFile
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<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.