file_type_enum
An enum with a variant for each file type.
Alternatives:
- If you want a enum tree, check the crate
fs-tree
. - If you don't need an enum, check these methods from
std
instead:
Example:
use ;
use FileType;
As shown in the example FileType
also implements Display
.
Warning
Note that, like std
functions, FileType::read_at
follows symlinks, therefore it is
impossible to get the FileType::Symlink
variant. If you want symlink-awareness, use
FileType::symlink_read_at
instead.
Conversions
- From
AsRef<Path>
,fs::Metadata
and std'sFileType
. - From and into
libc::mode_t
(via the feature"mode-t-conversion"
).