enum Gio::FileType

Overview

Indicates the file's on-disk type.

On Windows systems a file will never have %G_FILE_TYPE_SYMBOLIC_LINK type; use #GFileInfo and %G_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 %G_FILE_TYPE_REGULAR or %G_FILE_TYPE_DIRECTORY.

Defined in:

lib/gi-crystal/src/auto/gio-2.0/gio.cr

Enum Members

Unknown = 0_u32

File's type is unknown.

Regular = 1_u32

File handle represents a regular file.

Directory = 2_u32

File handle represents a directory.

SymbolicLink = 3_u32

File handle represents a symbolic link (Unix systems).

Special = 4_u32

File is a "special" file, such as a socket, fifo, block device, or character device.

Shortcut = 5_u32

File is a shortcut (Windows systems).

Mountable = 6_u32

File is a mountable location.

Class Method Summary

Instance Method Summary

Class methods inherited from struct Enum

g_type : UInt64 g_type

Class Method Detail

def self.g_type : UInt64 #

Returns the type id (GType) registered in GLib type system.


Instance Method Detail

def directory? #

def mountable? #

def regular? #

def shortcut? #

def special? #

def symbolic_link? #

def unknown? #