pub trait FileTypeExt {
// Required methods
fn is_block_device(&self) -> bool;
fn is_char_device(&self) -> bool;
fn is_fifo(&self) -> bool;
fn is_socket(&self) -> bool;
}Expand description
Extension trait for FileType.
Required Methods§
Sourcefn is_block_device(&self) -> bool
fn is_block_device(&self) -> bool
Returns true if this file type is a block device.
This corresponds to
std::os::unix::fs::FileTypeExt::is_block_device, except that it’s
supported on Windows platforms as well.
Sourcefn is_char_device(&self) -> bool
fn is_char_device(&self) -> bool
Returns true if this file type is a char device.
This corresponds to
std::os::unix::fs::FileTypeExt::is_char_device, except that it’s
supported on Windows platforms as well.
Sourcefn is_fifo(&self) -> bool
fn is_fifo(&self) -> bool
Returns true if this file type is a fifo.
This corresponds to
std::os::unix::fs::FileTypeExt::is_fifo, except that it’s supported
on Windows platforms as well.
Sourcefn is_socket(&self) -> bool
fn is_socket(&self) -> bool
Returns true if this file type is a socket.
This corresponds to
std::os::unix::fs::FileTypeExt::is_socket, except that it’s
supported on Windows platforms as well.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementations on Foreign Types§
Source§impl FileTypeExt for FileType
Available on non-Windows only.
impl FileTypeExt for FileType
Source§impl FileTypeExt for FileType
Available on crate feature std and non-Windows only.
impl FileTypeExt for FileType
std and non-Windows only.