pub struct FolderPath { /* private fields */ }
Expand description
A folder path.
Implementations§
Source§impl FolderPath
Construction
impl FolderPath
Construction
Sourcepub unsafe fn new(path: StoragePath) -> Self
pub unsafe fn new(path: StoragePath) -> Self
Source§impl FolderPath
Storage Path
impl FolderPath
Storage Path
Sourcepub fn path(&self) -> &StoragePath
pub fn path(&self) -> &StoragePath
Gets the storage path.
Sourcepub fn to_path(self) -> StoragePath
pub fn to_path(self) -> StoragePath
Converts the folder path to a storage path.
Source§impl FolderPath
Is System
impl FolderPath
Is System
Sourcepub fn is_local_path(&self) -> bool
pub fn is_local_path(&self) -> bool
Checks if the path is a local path.
Sourcepub fn is_unix_path(&self) -> bool
pub fn is_unix_path(&self) -> bool
Checks if the path is a Unix path.
Sourcepub fn is_windows_path(&self) -> bool
pub fn is_windows_path(&self) -> bool
Checks if the path is a Windows path.
Source§impl FolderPath
Current Working Directory
impl FolderPath
Current Working Directory
Sourcepub fn current_working_directory() -> Result<Self, Error>
pub fn current_working_directory() -> Result<Self, Error>
Gets the current working directory.
Source§impl FolderPath
Roots
impl FolderPath
Roots
Source§impl FolderPath
Clone
impl FolderPath
Clone
Sourcepub fn clone_with_extra_capacity(&self, extra_capacity: usize) -> Self
pub fn clone_with_extra_capacity(&self, extra_capacity: usize) -> Self
Clones the path with the extra capacity.
Source§impl FolderPath
Append
impl FolderPath
Append
Sourcepub fn with_appended<S>(self, s: S) -> StoragePath
pub fn with_appended<S>(self, s: S) -> StoragePath
Appends the string.
Sourcepub fn clone_append<S>(&self, s: S) -> StoragePath
pub fn clone_append<S>(&self, s: S) -> StoragePath
Clones the path and appends the string.
The result is the same as path.clone().with_appended(s)
but minimizes allocation.
Source§impl FolderPath
Append Char
impl FolderPath
Append Char
Sourcepub fn with_appended_char(self, c: char) -> StoragePath
pub fn with_appended_char(self, c: char) -> StoragePath
Appends the char.
Source§impl FolderPath
Make File
impl FolderPath
Make File
Source§impl FolderPath
Delete Files
impl FolderPath
Delete Files
Sourcepub fn delete_files(&self) -> Result<(), Error>
pub fn delete_files(&self) -> Result<(), Error>
Deletes the files in the folder.
Returns Ok(())
.
Source§impl FolderPath
List Files as Vec
impl FolderPath
List Files as Vec
Source§impl FolderPath
List Files as Vec Unsorted
impl FolderPath
List Files as Vec Unsorted
Source§impl FolderPath
List Files to Vec
impl FolderPath
List Files to Vec
Source§impl FolderPath
List Files to Vec Unsorted
impl FolderPath
List Files to Vec Unsorted
Trait Implementations§
Source§impl AsRef<FolderPath> for FolderPath
impl AsRef<FolderPath> for FolderPath
Source§fn as_ref(&self) -> &FolderPath
fn as_ref(&self) -> &FolderPath
Converts this type into a shared reference of the (usually inferred) input type.
Source§impl AsRef<OsStr> for FolderPath
impl AsRef<OsStr> for FolderPath
Source§impl AsRef<Path> for FolderPath
impl AsRef<Path> for FolderPath
Source§impl AsRef<str> for FolderPath
impl AsRef<str> for FolderPath
Source§impl Clone for FolderPath
impl Clone for FolderPath
Source§fn clone(&self) -> FolderPath
fn clone(&self) -> FolderPath
Returns a copy 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 FolderPath
impl Debug for FolderPath
Source§impl Display for FolderPath
impl Display for FolderPath
Source§impl From<FolderPath> for StoragePath
impl From<FolderPath> for StoragePath
Source§fn from(path: FolderPath) -> Self
fn from(path: FolderPath) -> Self
Converts to this type from the input type.
Source§impl Hash for FolderPath
impl Hash for FolderPath
Source§impl Ord for FolderPath
impl Ord for FolderPath
Source§fn cmp(&self, other: &FolderPath) -> Ordering
fn cmp(&self, other: &FolderPath) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for FolderPath
impl PartialEq for FolderPath
Source§impl PartialOrd for FolderPath
impl PartialOrd for FolderPath
impl Eq for FolderPath
impl StructuralPartialEq for FolderPath
Auto Trait Implementations§
impl Freeze for FolderPath
impl RefUnwindSafe for FolderPath
impl Send for FolderPath
impl Sync for FolderPath
impl Unpin for FolderPath
impl UnwindSafe for FolderPath
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