Package: gio

GEnum gio:file-type

Declaration

(gobject:define-genum "GFileType" file-type
  (:export t
   :type-initializer "g_file_type_get_type")
  (:unknown 0)
  (:regular 1)
  (:directory 2)
  (:symbolic-link 3)
  (:special 4)
  (:shortcut 5)
  (:mountable 6))  

Values

:unkown
The file type is unknown.
:regular
The file handle represents a regular file.
:directory
The file handle represents a directory.
:symbolic-link
The file handle represents a symbolic link (Unix systems).
:special
The file is a "special" file, such as a socket, fifo, block device, or character device.
:shortcut
The file is a shortcut (Windows systems).
:mountable
The file is a mountable location.

Details

Specifies the type of file on the hard drive. On Windows systems a file will never have :symbolic-link type. Use the g:file-info object and the "standard::is-symlink" attribute 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. The g:file-type enumeration cannot precisely represent this important distinction, which is why all Windows symlinks will continue to be reported as :regular or :directory value.
 

See also

2026-03-21