pub enum FileType {
Socket,
Symlink,
Regular,
BlockDevice,
Directory,
CharDevice,
Fifo,
Unknown(u32),
}Expand description
Unix file type extracted from the upper bits of a CPIO mode field.
The file type occupies bits 12-15 of the mode value (mode & 0o170000).
Use FileType::from_mode to extract the type from a raw mode value,
and make_mode to combine a file type with permission bits.
Variants§
Socket
Unix-domain or network socket.
Symlink
Symbolic link.
Regular
Regular file.
BlockDevice
Block device node.
Directory
Directory.
CharDevice
Character device node.
Fifo
Named pipe.
Unknown(u32)
Unrecognized file-type mode bits.
Implementations§
Trait Implementations§
impl Copy for FileType
impl Eq for FileType
impl StructuralPartialEq for FileType
Auto Trait Implementations§
impl Freeze for FileType
impl RefUnwindSafe for FileType
impl Send for FileType
impl Sync for FileType
impl Unpin for FileType
impl UnsafeUnpin 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