[−][src]Trait gio::FileInputStreamExt
Required methods
fn query_info<P: IsA<Cancellable>>(
&self,
attributes: &str,
cancellable: Option<&P>
) -> Result<FileInfo, Error>
&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 FileInputStreamExt::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
a FileInfo
, or None
on 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
)
&self,
attributes: &str,
io_priority: Priority,
cancellable: Option<&P>,
callback: Q
)
Queries the stream information asynchronously.
When the operation is finished callback
will be called.
You can then call FileInputStreamExt::query_info_finish
to get the result of the operation.
For the synchronous version of this function,
see FileInputStreamExt::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
user_data
the data to pass to callback function
fn query_info_async_future(
&self,
attributes: &str,
io_priority: Priority
) -> Pin<Box_<dyn Future<Output = Result<FileInfo, Error>> + 'static>>
&self,
attributes: &str,
io_priority: Priority
) -> Pin<Box_<dyn Future<Output = Result<FileInfo, Error>> + 'static>>
Implementors
impl<O: IsA<FileInputStream>> FileInputStreamExt for O
[src]
fn query_info<P: IsA<Cancellable>>(
&self,
attributes: &str,
cancellable: Option<&P>
) -> Result<FileInfo, Error>
[src]
&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
)
[src]
&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>>
[src]
&self,
attributes: &str,
io_priority: Priority
) -> Pin<Box_<dyn Future<Output = Result<FileInfo, Error>> + 'static>>