pub struct FileType(_);Available on crate feature
fs_utf8 only.Expand description
A structure representing a type of file with accessors for each file type.
This corresponds to std::fs::FileType.
We need to define our own version because the libstd `FileType` doesn't
have a public constructor that we can use.
Implementations§
source§impl FileType
impl FileType
sourcepub fn is_dir(&self) -> bool
pub fn is_dir(&self) -> bool
Tests whether this file type represents a directory.
This corresponds to std::fs::FileType::is_dir.
sourcepub fn is_file(&self) -> bool
pub fn is_file(&self) -> bool
Tests whether this file type represents a regular file.
This corresponds to std::fs::FileType::is_file.
sourcepub fn is_symlink(&self) -> bool
pub fn is_symlink(&self) -> bool
Tests whether this file type represents a symbolic link.
This corresponds to std::fs::FileType::is_symlink.
Trait Implementations§
source§impl FileTypeExt for FileType
Available on Unix or target_os="vxworks" only.
impl FileTypeExt for FileType
Available on Unix or
target_os="vxworks" only.source§fn is_block_device(&self) -> bool
fn is_block_device(&self) -> bool
Returns
true if this file type is a block device.source§fn is_char_device(&self) -> bool
fn is_char_device(&self) -> bool
Returns
true if this file type is a character device.