FileIOStream.queryInfo
gio.file_info.FileInfo queryInfo(string attributes, gio.cancellable.Cancellable cancellable = null)Queries a file io stream for the given attributes. This function blocks while querying the stream. For the asynchronous version of this function, see [gio.file_iostream.FileIOStream.queryInfoAsync]. While the stream is blocked, the stream will set the pending flag internally, and any other operations on the stream will fail with [gio.types.IOErrorEnum.Pending].
Can fail if the stream was already closed (with error being set to [gio.types.IOErrorEnum.Closed]), the stream has pending operations (with error being set to [gio.types.IOErrorEnum.Pending]), or if querying info is not supported for the stream's interface (with error being set to [gio.types.IOErrorEnum.NotSupported]). I all cases of failure, null will be returned.
If cancellable is not null, then the operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, the error [gio.types.IOErrorEnum.Cancelled] will be set, and null will be returned.
Parameters
attributes | a file attribute query string. |
cancellable | optional #GCancellable object, null to ignore. |