#[repr(u32)]pub enum FileType {
RegularFile = 0,
Directory = 1,
}Expand description
Represents the type of a file in the filesystem.
This enum is used to distinguish between different kinds of inodes, such as regular files and directories. It is stored on disk as part of the inode metadata to identify how the data associated with the inode should be interpreted.
Variants§
RegularFile = 0
A regular file, containing user data.
This type represents standard files used to store arbitrary user content (e.g., text, binaries, etc.). The file’s data blocks are directly mapped to its contents.
Directory = 1
A directory, which stores a list of file entries.
A directory maps file names to inode numbers. Its contents are typically a structured list of directory entries that allow for hierarchical navigation within the filesystem.
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 UnwindSafe for FileType
Blanket Implementations§
§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)