Trait fs_err::PathExt

source ·
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§

source

fn fs_err_try_exists(&self) -> Result<bool>

Returns Ok(true) if the path points at an existing entity.

Wrapper for Path::try_exists.

source

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.

Query the metadata about a file without following symlinks.

Wrapper for crate::symlink_metadata.

source

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.

Reads a symbolic link, returning the file that the link points to.

Wrapper for crate::read_link.

source

fn fs_err_read_dir(&self) -> Result<ReadDir>

Returns an iterator over the entries within a directory.

Wrapper for crate::read_dir.

Implementations on Foreign Types§

source§

impl PathExt for Path

Implementors§