pub struct FolderPath { /* private fields */ }Expand description
A folder path.
Implementations§
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.
Source§impl FolderPath
List Files
impl FolderPath
List Files
Sourcepub fn list_files(&self) -> Result<ListFilesOp, Error>
pub fn list_files(&self) -> Result<ListFilesOp, Error>
Creates a list-files operation on the folder.
The files will be returned in lexicographical order.
Sourcepub fn list_files_unsorted(&self) -> Result<ListFilesOp, Error>
pub fn list_files_unsorted(&self) -> Result<ListFilesOp, Error>
Creates a list-files operation on the folder where the files may be unsorted.
The files will be returned in lexicographical order.
Source§impl FolderPath
List Files as Vec
impl FolderPath
List Files as Vec
Sourcepub fn list_files_as_vec(&self) -> Result<Vec<FilePath>, Error>
pub fn list_files_as_vec(&self) -> Result<Vec<FilePath>, Error>
Lists the files in the folder as a Vec<FilePath> sorted in lexicographical order.
Returns Ok(sorted_files).
Sourcepub fn list_files_as_vec_unsorted(&self) -> Result<Vec<FilePath>, Error>
pub fn list_files_as_vec_unsorted(&self) -> Result<Vec<FilePath>, Error>
Lists the files as a Vec<FilePath>.
Returns Ok(files).
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
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, string: S) -> StoragePath
pub fn with_appended<S>(self, string: S) -> StoragePath
Appends the string.
Sourcepub fn clone_append<S>(&self, string: S) -> StoragePath
pub fn clone_append<S>(&self, string: S) -> StoragePath
Clones the path and appends the string.
The result is the same as path.clone().with_appended(s) but with a single 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
Length
impl FolderPath
Length
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.
Source§impl FolderPath
Is System
impl FolderPath
Is System
Sourcepub fn is_unix_path(&self) -> bool
pub fn is_unix_path(&self) -> bool
Checks if the path is a Unix path.
Source§impl FolderPath
Is System
impl FolderPath
Is System
Sourcepub fn is_windows_path(&self) -> bool
pub fn is_windows_path(&self) -> bool
Checks if the path is a Windows path.
Trait Implementations§
Source§impl AsRef<FolderPath> for FolderPath
impl AsRef<FolderPath> for FolderPath
Source§fn as_ref(&self) -> &FolderPath
fn as_ref(&self) -> &FolderPath
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
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more