pub enum FileType {
File,
Directory,
Symlink,
}Expand description
The type of a filesystem entry.
Every path in a filesystem is one of these three types.
§Variants
File— Regular file containing dataDirectory— Container for other entriesSymlink— Symbolic link pointing to another path
§Example
use anyfs_backend::FileType;
let ft = FileType::File;
assert_eq!(ft, FileType::File);
assert_ne!(ft, FileType::Directory);§Usage with Metadata
use anyfs_backend::{Metadata, FileType};
let meta = Metadata::default();
match meta.file_type {
FileType::File => println!("It's a file"),
FileType::Directory => println!("It's a directory"),
FileType::Symlink => println!("It's a symlink"),
}Variants§
File
Regular file containing data.
Directory
Directory containing other entries.
Symlink
Symbolic link pointing to another path.
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§
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