File.queryFileType

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

flagsa set of #GFileQueryInfoFlags passed to [gio.file.File.queryInfo]
cancellableoptional #GCancellable object, null to ignore

Returns

The #GFileType of the file and [gio.types.FileType.Unknown]

if the file does not exist