Enum gio::FileType [−][src]
#[non_exhaustive] pub enum FileType { Unknown, Regular, Directory, SymbolicLink, Special, Shortcut, Mountable, // some variants omitted }
Expand description
Indicates the file’s on-disk type.
On Windows systems a file will never have SymbolicLink
type;
use FileInfo
and FILE_ATTRIBUTE_STANDARD_IS_SYMLINK
to determine
whether a file is a symlink or not. This is due to the fact that NTFS does
not have a single filesystem object type for symbolic links - it has
files that symlink to files, and directories that symlink to directories.
FileType
enumeration cannot precisely represent this important distinction,
which is why all Windows symlinks will continue to be reported as
Regular
or Directory
.
Variants (Non-exhaustive)
This enum is marked as non-exhaustive
File’s type is unknown.
File handle represents a regular file.
File handle represents a directory.
File handle represents a symbolic link (Unix systems).
File is a “special” file, such as a socket, fifo, block device, or character device.
File is a shortcut (Windows systems).
File is a mountable location.
Trait Implementations
type Checker = GenericValueTypeChecker<Self>
type Checker = GenericValueTypeChecker<Self>
Value type checker.
Get the contained value from a Value
. Read more
This method returns an ordering between self
and other
values if one exists. Read more
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
Returns the type identifier of Self
.
Auto Trait Implementations
impl RefUnwindSafe for FileType
impl UnwindSafe for FileType
Blanket Implementations
Mutably borrows from an owned value. Read more
Returns a SendValue
clone of self
.