Trait gio::prelude::FileInputStreamExt [−][src]
pub trait FileInputStreamExt: 'static {
fn query_info<P: IsA<Cancellable>>(
&self,
attributes: &str,
cancellable: Option<&P>
) -> Result<FileInfo, Error>;
fn query_info_async<P: IsA<Cancellable>, Q: FnOnce(Result<FileInfo, Error>) + Send + 'static>(
&self,
attributes: &str,
io_priority: Priority,
cancellable: Option<&P>,
callback: Q
);
fn query_info_async_future(
&self,
attributes: &str,
io_priority: Priority
) -> Pin<Box_<dyn Future<Output = Result<FileInfo, Error>> + 'static>>;
}Expand description
Required methods
fn query_info<P: IsA<Cancellable>>(
&self,
attributes: &str,
cancellable: Option<&P>
) -> Result<FileInfo, Error>
fn query_info<P: IsA<Cancellable>>(
&self,
attributes: &str,
cancellable: Option<&P>
) -> Result<FileInfo, Error>Queries a file input stream the given attributes. This function blocks
while querying the stream. For the asynchronous (non-blocking) version
of this function, see 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 IOErrorEnum::Pending.
attributes
a file attribute query string.
cancellable
optional Cancellable object, None to ignore.
Returns
Queries the stream information asynchronously.
When the operation is finished callback will be called.
You can then call g_file_input_stream_query_info_finish()
to get the result of the operation.
For the synchronous version of this function,
see query_info().
If cancellable is not None, then the operation can be cancelled by
triggering the cancellable object from another thread. If the operation
was cancelled, the error IOErrorEnum::Cancelled will be set
attributes
a file attribute query string.
io_priority
the [I/O priority][io-priority] of the request
cancellable
optional Cancellable object, None to ignore.
callback
callback to call when the request is satisfied