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§
Sourcefn readable(&self) -> bool
fn readable(&self) -> bool
Returns true if the path exists and is readable by the current user.
Sourcefn writable(&self) -> bool
fn writable(&self) -> bool
Returns true if the path exists and is writable by the current user.
Sourcefn executable(&self) -> bool
fn executable(&self) -> bool
Returns true if the path exists and is executable by the current user.
Sourcefn exists_and_is_block_device(&self) -> bool
fn exists_and_is_block_device(&self) -> bool
Returns true if the path exists and is a block device.
Sourcefn exists_and_is_char_device(&self) -> bool
fn exists_and_is_char_device(&self) -> bool
Returns true if the path exists and is a character device.
Sourcefn exists_and_is_fifo(&self) -> bool
fn exists_and_is_fifo(&self) -> bool
Returns true if the path exists and is a FIFO (named pipe).
Sourcefn exists_and_is_socket(&self) -> bool
fn exists_and_is_socket(&self) -> bool
Returns true if the path exists and is a socket.
Sourcefn exists_and_is_setgid(&self) -> bool
fn exists_and_is_setgid(&self) -> bool
Returns true if the path exists and has the setgid bit set.
Sourcefn exists_and_is_setuid(&self) -> bool
fn exists_and_is_setuid(&self) -> bool
Returns true if the path exists and has the setuid bit set.
Sourcefn exists_and_is_sticky_bit(&self) -> bool
fn exists_and_is_sticky_bit(&self) -> bool
Returns true if the path exists and has the sticky bit set.