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 std::path::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>
Available on rustc_1_63 only.
fn fs_err_try_exists(&self) -> Result<bool>
rustc_1_63 only.Returns Ok(true) if the path points at an existing entity.
Wrapper for std::path::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 fs_err::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 fs_err::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 fs_err::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 fs_err::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 fs_err::read_dir.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementations on Foreign Types§
Source§impl PathExt for Path
impl PathExt for Path
Source§fn fs_err_try_exists(&self) -> Result<bool>
fn fs_err_try_exists(&self) -> Result<bool>
rustc_1_63 only.