Trait gio::prelude::FileInputStreamExt
source · pub trait FileInputStreamExt: IsA<FileInputStream> + Sealed + 'static {
// Provided methods
fn query_info(
&self,
attributes: &str,
cancellable: Option<&impl IsA<Cancellable>>,
) -> Result<FileInfo, Error> { ... }
fn query_info_async<P: FnOnce(Result<FileInfo, Error>) + 'static>(
&self,
attributes: &str,
io_priority: Priority,
cancellable: Option<&impl IsA<Cancellable>>,
callback: P,
) { ... }
fn query_info_future(
&self,
attributes: &str,
io_priority: Priority,
) -> Pin<Box_<dyn Future<Output = Result<FileInfo, Error>> + 'static>> { ... }
}
Expand description
Provided Methods§
sourcefn query_info(
&self,
attributes: &str,
cancellable: Option<&impl IsA<Cancellable>>,
) -> Result<FileInfo, Error>
fn query_info( &self, attributes: &str, cancellable: Option<&impl IsA<Cancellable>>, ) -> 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 g_file_input_stream_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 #GCancellable object, None
to ignore.
§Returns
a #GFileInfo, or None
on error.
sourcefn query_info_async<P: FnOnce(Result<FileInfo, Error>) + 'static>(
&self,
attributes: &str,
io_priority: Priority,
cancellable: Option<&impl IsA<Cancellable>>,
callback: P,
)
fn query_info_async<P: FnOnce(Result<FileInfo, Error>) + 'static>( &self, attributes: &str, io_priority: Priority, cancellable: Option<&impl IsA<Cancellable>>, callback: P, )
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 g_file_input_stream_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 #GCancellable object, None
to ignore.
§callback
a #GAsyncReadyCallback to call when the request is satisfied