if the file does not exist
File.queryFileType
gio.types.FileType queryFileType(gio.types.FileQueryInfoFlags flags, gio.cancellable.Cancellable cancellable = null)Utility function to inspect the #GFileType of a file. This is implemented using [gio.file.File.queryInfo] and as such does blocking I/O.
The primary use case of this method is to check if a file is a regular file, directory, or symlink.
Parameters
flags | a set of #GFileQueryInfoFlags passed to [gio.file.File.queryInfo] |
cancellable | optional #GCancellable object, null to ignore |
Returns
The #GFileType of the file and [gio.types.FileType.Unknown]