Class: Gio::FileInputStream

Inherits:
InputStream show all
Defined in:
(unknown)

Instance Method Summary collapse

Methods inherited from InputStream

#clear_pending, #close, #close_async, #close_finish, #has_pending, #is_closed, open, #read, #read_all, #read_all_async, #read_all_finish, #read_all_raw, #read_async, #read_bytes, #read_bytes_async, #read_bytes_finish, #read_finish, #read_raw, #set_pending, #skip, #skip_async, #skip_finish

Instance Method Details

#query_info(attributes, cancellable) ⇒ Gio::FileInfo

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 %G_IO_ERROR_PENDING.

Parameters:

  • attributes (String)

    a file attribute query string.

  • cancellable (Gio::Cancellable)

    optional #GCancellable object, nil to ignore.

Returns:

#query_info_async(attributes, io_priority, cancellable, callback, user_data) ⇒ nil

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 nil, then the operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, the error %G_IO_ERROR_CANCELLED will be set

Parameters:

  • attributes (String)

    a file attribute query string.

  • io_priority (Integer)

    the [I/O priority][io-priority] of the request

  • cancellable (Gio::Cancellable)

    optional #GCancellable object, nil to ignore.

  • callback (Gio::AsyncReadyCallback)

    a GAsync::ReadyCallback to call when the request is satisfied

  • user_data (GObject)

    the data to pass to callback function

Returns:

  • (nil)

#query_info_finish(result) ⇒ Gio::FileInfo

Finishes an asynchronous info query operation.

Parameters:

Returns: