pub trait PathExt: Sealed {
// Required methods
fn fs_err_try_exists(&self) -> Result<bool>;
fn fs_err_metadata(&self) -> Result<Metadata>;
fn fs_err_symlink_metadata(&self) -> Result<Metadata>;
fn fs_err_canonicalize(&self) -> Result<PathBuf>;
fn fs_err_read_link(&self) -> Result<PathBuf>;
fn fs_err_read_dir(&self) -> Result<ReadDir>;
}
Expand description
Defines aliases on Path
for fs_err
functions.
This trait is sealed and can not be implemented by other crates.
Required Methods§
sourcefn fs_err_try_exists(&self) -> Result<bool>
fn fs_err_try_exists(&self) -> Result<bool>
Returns Ok(true) if the path points at an existing entity.
Wrapper for Path::try_exists
.
sourcefn fs_err_metadata(&self) -> Result<Metadata>
fn fs_err_metadata(&self) -> Result<Metadata>
Given a path, query the file system to get information about a file, directory, etc.
Wrapper for crate::metadata
.
sourcefn fs_err_symlink_metadata(&self) -> Result<Metadata>
fn fs_err_symlink_metadata(&self) -> Result<Metadata>
Query the metadata about a file without following symlinks.
Wrapper for crate::symlink_metadata
.
sourcefn fs_err_canonicalize(&self) -> Result<PathBuf>
fn fs_err_canonicalize(&self) -> Result<PathBuf>
Returns the canonical, absolute form of a path with all intermediate components normalized and symbolic links resolved.
Wrapper for crate::canonicalize
.
sourcefn fs_err_read_link(&self) -> Result<PathBuf>
fn fs_err_read_link(&self) -> Result<PathBuf>
Reads a symbolic link, returning the file that the link points to.
Wrapper for crate::read_link
.
sourcefn fs_err_read_dir(&self) -> Result<ReadDir>
fn fs_err_read_dir(&self) -> Result<ReadDir>
Returns an iterator over the entries within a directory.
Wrapper for crate::read_dir
.