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§
source§impl FileType
impl FileType
sourcepub const fn from_raw_mode(st_mode: RawMode) -> Self
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
.
sourcepub const fn as_raw_mode(self) -> RawMode
pub const fn as_raw_mode(self) -> RawMode
Construct an st_mode
value from Stat
.