pub struct Path { /* private fields */ }Implementations§
Source§impl Path
impl Path
pub fn temp_dir_pattern(str: &str) -> Result<Path>
pub fn temp_dir() -> Result<Path>
pub fn current_exe() -> Result<Path>
pub fn current_dir() -> Result<Path>
pub fn home_dir() -> Result<Path, VarError>
pub fn empty() -> Self
pub fn root() -> Self
pub fn iter_path(&self) -> PathIterator<'_> ⓘ
pub fn dirname<'a>(&'a self) -> Option<Path>
pub fn basename<'a>(&'a self) -> Option<&'a str>
pub fn extname<'a>(&'a self) -> Option<&'a str>
pub fn as_str<'a>(&'a self) -> &'a str
pub fn to_path_buf(&self) -> PathBuf
pub fn is_root(&self) -> bool
pub fn is_absolute(&self) -> bool
pub fn is_relative(&self) -> bool
pub fn is_forward(&self) -> bool
pub fn is_extern(&self) -> bool
pub fn fs_create_parent(&self) -> Result<&Self>
pub fn fs_create_dir_all(&self) -> Result<&Self>
pub fn fs_create_dir(&self) -> Result<&Self>
pub fn fs_set_permissions(&self, permissions: Permissions) -> Result<&Self>
pub fn fs_metadata(&self) -> Result<Metadata>
pub fn fs_exists(&self) -> bool
pub fn fs_is_file(&self) -> bool
pub fn fs_is_dir(&self) -> bool
pub fn if_exists(&self) -> Option<Path>
pub fn if_file(&self) -> Option<Path>
pub fn if_dir(&self) -> Option<Path>
pub fn fs_read(&self) -> Result<Vec<u8>>
pub fn fs_read_prealloc(&self) -> Result<Vec<u8>>
pub fn fs_read_with_size(&self, size: u64) -> Result<Vec<u8>>
pub fn fs_read_text(&self) -> Result<String>
pub fn fs_read_text_prealloc(&self) -> Result<String>
pub fn fs_read_text_with_size(&self, size: u64) -> Result<String>
pub fn fs_read_dir(&self) -> Result<ReadDir>
pub fn fs_write<T: AsRef<[u8]>>(&self, data: T) -> Result<&Self>
pub fn fs_write_text<T: AsRef<str>>(&self, text: T) -> Result<&Self>
pub fn fs_expect<T: AsRef<[u8]>>( &self, data: T, permissions: Permissions, ) -> Result<&Self, ImmutableErr>
pub fn fs_change<T: AsRef<[u8]>>( &self, data: T, permissions: Permissions, ) -> Result<&Self>
pub fn fs_rename(&self, new_path: &Path) -> Result<&Self>
pub fn fs_rm_file(&self) -> Result<&Self>
pub fn fs_rm(&self) -> Result<&Self>
pub fn without_ext(&self) -> Path
pub fn with_ext(&self, ext: &str) -> Path
pub fn set_ext(&mut self, ext: &str) -> &mut Self
pub fn with_join(&self, other: &Path) -> Path
pub fn with_join_str<T>(&self, other: T) -> Path
pub fn join(&mut self, other: &Path) -> &mut Self
pub fn join_str<T>(&mut self, other: T) -> &mut Self
pub fn contains(&self, other: &Path) -> bool
pub fn relative_to(&self, other: &Path) -> Path
Trait Implementations§
Source§impl Ord for Path
impl Ord for Path
Source§impl PartialOrd for Path
impl PartialOrd for Path
impl Eq for Path
impl StructuralPartialEq for Path
Auto Trait Implementations§
impl Freeze for Path
impl RefUnwindSafe for Path
impl Send for Path
impl Sync for Path
impl Unpin for Path
impl UnwindSafe for Path
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