#[non_exhaustive]pub enum FileType {
Unknown,
Regular,
Directory,
SymbolicLink,
Special,
Shortcut,
Mountable,
}
Expand description
Indicates the file’s on-disk type.
On Windows systems a file will never have SymbolicLink
type;
use #GFileInfo 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.
#GFileType 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
Unknown
File’s type is unknown.
Regular
File handle represents a regular file.
Directory
File handle represents a directory.
SymbolicLink
File handle represents a symbolic link (Unix systems).
Special
File is a “special” file, such as a socket, fifo, block device, or character device.
Shortcut
File is a shortcut (Windows systems).
Mountable
File is a mountable location.
Trait Implementations§
source§impl<'a> FromValue<'a> for FileType
impl<'a> FromValue<'a> for FileType
§type Checker = GenericValueTypeChecker<FileType>
type Checker = GenericValueTypeChecker<FileType>
source§unsafe fn from_value(value: &'a Value) -> Self
unsafe fn from_value(value: &'a Value) -> Self
Value
. Read moresource§impl HasParamSpec for FileType
impl HasParamSpec for FileType
source§impl Ord for FileType
impl Ord for FileType
source§impl PartialOrd for FileType
impl PartialOrd for FileType
source§impl StaticType for FileType
impl StaticType for FileType
source§fn static_type() -> Type
fn static_type() -> Type
Self
.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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)source§impl<T> IntoClosureReturnValue for T
impl<T> IntoClosureReturnValue for T
fn into_closure_return_value(self) -> Option<Value>
source§impl<T> PropertyGet for Twhere
T: HasParamSpec,
impl<T> PropertyGet for Twhere
T: HasParamSpec,
source§impl<T> StaticTypeExt for Twhere
T: StaticType,
impl<T> StaticTypeExt for Twhere
T: StaticType,
source§fn ensure_type()
fn ensure_type()
source§impl<T> ToSendValue for T
impl<T> ToSendValue for T
source§fn to_send_value(&self) -> SendValue
fn to_send_value(&self) -> SendValue
SendValue
clone of self
.