Enum rustix::fs::FileType
pub enum FileType {
RegularFile,
Directory,
Symlink,
Fifo,
Socket,
CharacterDevice,
BlockDevice,
Unknown,
}
Variants
RegularFile
S_IFREG
Directory
S_IFDIR
Symlink
S_IFLNK
Fifo
S_IFIFO
Socket
S_IFSOCK
CharacterDevice
S_IFCHR
BlockDevice
S_IFBLK
Unknown
An unknown filesystem object.
Implementations
impl FileType
pub const fn from_raw_mode(st_mode: RawMode) -> Self
Construct a FileType
from the S_IFMT
bits of the st_mode
field of
a Stat
.
pub const fn as_raw_mode(Self) -> RawMode
Construct an st_mode
value from Stat
.
Trait Implementations
impl Debug for FileType
fn fmt(&Self, f: &mut $crate::fmt::Formatter<'_>) -> $crate::fmt::Result
impl StructuralEq for FileType
impl StructuralPartialEq for FileType
Auto Trait Implementations
impl RefUnwindSafe for FileType
impl UnwindSafe for FileType
Blanket Implementations
impl<T> BorrowMut<T> for T
where
T: ?Sized,
where
T: ?Sized,
fn borrow_mut(&mut Self) -> &mut T