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;
}Available on non-Hermit and not ((Fortanix and SGX, or WebAssembly and non-WASI)) and (Unix) only.
Expand description
Unix-specific extensions for fs::FileType.
Adds support for special Unix file types such as block/character devices, pipes, and sockets.
Required Methods§
1.5.0 · Sourcefn is_block_device(&self) -> bool
fn is_block_device(&self) -> bool
Returns true if this file type is a block device.
§Examples
1.5.0 · Sourcefn is_char_device(&self) -> bool
fn is_char_device(&self) -> bool
Returns true if this file type is a char device.
§Examples
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".