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
.
Trait Implementations§
source§impl PartialEq<FileType> for FileType
impl PartialEq<FileType> for FileType
impl Copy for FileType
impl Eq for FileType
impl StructuralEq for FileType
impl StructuralPartialEq for FileType
Auto Trait Implementations§
impl RefUnwindSafe for FileType
impl Send for FileType
impl Sync for FileType
impl Unpin for FileType
impl UnwindSafe for FileType
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more