Class: Gio::FileOutputStream

Inherits:
Object
  • Object
show all
Defined in:
(unknown)

Instance Method Summary collapse

Instance Method Details

#etagString

Gets the entity tag for the file when it has been written. This must be called after the stream has been written and closed, as the etag can change while writing.

Returns:

  • (String)

    the entity tag for the stream.

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

Queries a file output stream for the given attributes. This function blocks while querying the stream. For the asynchronous version of this function, see g_file_output_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.

Can fail if the stream was already closed (with error being set to %G_IO_ERROR_CLOSED), the stream has pending operations (with error being set to %G_IO_ERROR_PENDING), or if querying info is not supported for the stream’s interface (with error being set to %G_IO_ERROR_NOT_SUPPORTED). In all cases of failure, nil will be returned.

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, and nil will be returned.

Parameters:

  • attributes (String)

    a file attribute query string.

  • cancellable (Gio::Cancellable)

    optional #GCancellable object, nil to ignore.

Returns:

  • (Gio::FileInfo)

    a GFile::Info for the stream, or nil on error.

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

Asynchronously queries the stream for a GFile::Info. When completed, callback will be called with a GAsync::Result which can be used to finish the operation with g_file_output_stream_query_info_finish().

For the synchronous version of this function, see g_file_output_stream_query_info().

Parameters:

  • attributes (String)

    a file attribute query string.

  • io_priority (Integer)

    the [I/O priority] of the request

  • cancellable (Gio::Cancellable)

    optional #GCancellable object, nil to ignore.

  • callback (Gio::AsyncReadyCallback)

    callback 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

Finalizes the asynchronous query started by g_file_output_stream_query_info_async().

Parameters:

Returns: