Gio.FileIOStream::query_info
function vfunc_query_info(attributes: String, cancellable: Gio.Cancellable): Gio.FileInfo { }
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.FileIOStream.prototype.query_info_async. While the stream is blocked, the stream will set the pending flag internally, and any other operations on the stream will fail with Gio.IOErrorEnum.pending.
Can fail if the stream was already closed (with @error being set to Gio.IOErrorEnum.closed), the stream has pending operations (with @error being set to Gio.IOErrorEnum.pending), or if querying info is not supported for the stream's interface (with @error being set to Gio.IOErrorEnum.not_supported). 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.IOErrorEnum.cancelled will be set, and null will be returned.
Since 2.22
- attributes
a file attribute query string.
- cancellable
optional Gio.Cancellable object, null to ignore.
- Returns
a Gio.FileInfo for the stream, or null on error.