PathExt

Trait PathExt 

Source
pub trait PathExt {
    // Required methods
    fn readable(&self) -> bool;
    fn writable(&self) -> bool;
    fn executable(&self) -> bool;
    fn exists_and_is_block_device(&self) -> bool;
    fn exists_and_is_char_device(&self) -> bool;
    fn exists_and_is_fifo(&self) -> bool;
    fn exists_and_is_socket(&self) -> bool;
    fn exists_and_is_setgid(&self) -> bool;
    fn exists_and_is_setuid(&self) -> bool;
    fn exists_and_is_sticky_bit(&self) -> bool;
    fn get_device_and_inode(&self) -> Result<(u64, u64), Error>;
}
Expand description

Extension trait for path-related filesystem operations.

Required Methods§

Source

fn readable(&self) -> bool

Returns true if the path exists and is readable by the current user.

Source

fn writable(&self) -> bool

Returns true if the path exists and is writable by the current user.

Source

fn executable(&self) -> bool

Returns true if the path exists and is executable by the current user.

Source

fn exists_and_is_block_device(&self) -> bool

Returns true if the path exists and is a block device.

Source

fn exists_and_is_char_device(&self) -> bool

Returns true if the path exists and is a character device.

Source

fn exists_and_is_fifo(&self) -> bool

Returns true if the path exists and is a FIFO (named pipe).

Source

fn exists_and_is_socket(&self) -> bool

Returns true if the path exists and is a socket.

Source

fn exists_and_is_setgid(&self) -> bool

Returns true if the path exists and has the setgid bit set.

Source

fn exists_and_is_setuid(&self) -> bool

Returns true if the path exists and has the setuid bit set.

Source

fn exists_and_is_sticky_bit(&self) -> bool

Returns true if the path exists and has the sticky bit set.

Source

fn get_device_and_inode(&self) -> Result<(u64, u64), Error>

Returns the device ID and inode number for the path.

Implementations on Foreign Types§

Source§

impl PathExt for Path

Implementors§