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
sourceimpl 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
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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more