pub enum FileType {
RegularFile = 32_768,
Directory = 16_384,
Symlink = 40_960,
Fifo = 4_096,
Socket = 49_152,
CharacterDevice = 8_192,
BlockDevice = 24_576,
Unknown = 24577,
}Available on crate feature
fs only.Variants§
RegularFile = 32_768
S_IFREG
Directory = 16_384
S_IFDIR
Symlink = 40_960
S_IFLNK
Fifo = 4_096
S_IFIFO
Socket = 49_152
S_IFSOCK
CharacterDevice = 8_192
S_IFCHR
BlockDevice = 24_576
S_IFBLK
Unknown = 24577
An unknown filesystem object.
Implementations§
Source§impl FileType
impl FileType
Sourcepub const fn from_raw_mode(st_mode: RawMode) -> Self
Available on crate feature fs, or non-crate feature use-libc-auxv and non-crate feature use-explicitly-provided-auxv and (crate feature param or crate feature runtime or crate feature thread or crate feature time or x86) only.
pub const fn from_raw_mode(st_mode: RawMode) -> Self
fs, or non-crate feature use-libc-auxv and non-crate feature use-explicitly-provided-auxv and (crate feature param or crate feature runtime or crate feature thread or crate feature time or x86) only.Construct a FileType from the S_IFMT bits of the st_mode field of
a Stat.
Sourcepub const fn as_raw_mode(self) -> RawMode
Available on crate feature fs, or non-crate feature use-libc-auxv and non-crate feature use-explicitly-provided-auxv and (crate feature param or crate feature runtime or crate feature thread or crate feature time or x86) only.
pub const fn as_raw_mode(self) -> RawMode
fs, or non-crate feature use-libc-auxv and non-crate feature use-explicitly-provided-auxv and (crate feature param or crate feature runtime or crate feature thread or crate feature time or x86) only.Construct an st_mode value from a FileType.
Source§impl FileType
impl FileType
Sourcepub fn is_symlink(self) -> bool
pub fn is_symlink(self) -> bool
Returns true if this FileType is a symlink.
Sourcepub fn is_fifo(self) -> bool
Available on non-WASI only.
pub fn is_fifo(self) -> bool
Returns true if this FileType is a fifo.
Sourcepub fn is_socket(self) -> bool
Available on non-WASI only.
pub fn is_socket(self) -> bool
Returns true if this FileType is a socket.
Sourcepub fn is_char_device(self) -> bool
pub fn is_char_device(self) -> bool
Returns true if this FileType is a character device.
Sourcepub fn is_block_device(self) -> bool
pub fn is_block_device(self) -> bool
Returns true if this FileType is a block device.
Trait Implementations§
Source§impl Clone for FileType
Available on crate feature fs, or non-crate feature use-libc-auxv and non-crate feature use-explicitly-provided-auxv and (crate feature param or crate feature runtime or crate feature thread or crate feature time or x86) only.
impl Clone for FileType
Available on crate feature
fs, or non-crate feature use-libc-auxv and non-crate feature use-explicitly-provided-auxv and (crate feature param or crate feature runtime or crate feature thread or crate feature time or x86) only.Source§impl Debug for FileType
Available on crate feature fs, or non-crate feature use-libc-auxv and non-crate feature use-explicitly-provided-auxv and (crate feature param or crate feature runtime or crate feature thread or crate feature time or x86) only.
impl Debug for FileType
Available on crate feature
fs, or non-crate feature use-libc-auxv and non-crate feature use-explicitly-provided-auxv and (crate feature param or crate feature runtime or crate feature thread or crate feature time or x86) only.Source§impl PartialEq for FileType
Available on crate feature fs, or non-crate feature use-libc-auxv and non-crate feature use-explicitly-provided-auxv and (crate feature param or crate feature runtime or crate feature thread or crate feature time or x86) only.
impl PartialEq for FileType
Available on crate feature
fs, or non-crate feature use-libc-auxv and non-crate feature use-explicitly-provided-auxv and (crate feature param or crate feature runtime or crate feature thread or crate feature time or x86) only.impl Copy for FileType
Available on crate feature
fs, or non-crate feature use-libc-auxv and non-crate feature use-explicitly-provided-auxv and (crate feature param or crate feature runtime or crate feature thread or crate feature time or x86) only.impl Eq for FileType
Available on crate feature
fs, or non-crate feature use-libc-auxv and non-crate feature use-explicitly-provided-auxv and (crate feature param or crate feature runtime or crate feature thread or crate feature time or x86) only.impl StructuralPartialEq for FileType
Available on crate feature
fs, or non-crate feature use-libc-auxv and non-crate feature use-explicitly-provided-auxv and (crate feature param or crate feature runtime or crate feature thread or crate feature time or x86) only.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