From 180c157f2a20b7d2dd9af05bfb5f515fd23870a0 Mon Sep 17 00:00:00 2001 From: Gian Mario Tagliaretti Date: Tue, 2 Jun 2009 10:41:26 +0200 Subject: Wrap gio.FileOutputStream.query_info_async Add the wrapper for gio.FileOutputStream.query_info_async including docs and a test. --- docs/reference/pygio-classes.xml | 1 + docs/reference/pygio-fileoutputstream.xml | 257 ++++++++++++++++++++++++++++++ 2 files changed, 258 insertions(+) create mode 100644 docs/reference/pygio-fileoutputstream.xml (limited to 'docs/reference') diff --git a/docs/reference/pygio-classes.xml b/docs/reference/pygio-classes.xml index 4f2cfb2..5c7f9df 100644 --- a/docs/reference/pygio-classes.xml +++ b/docs/reference/pygio-classes.xml @@ -21,6 +21,7 @@ + diff --git a/docs/reference/pygio-fileoutputstream.xml b/docs/reference/pygio-fileoutputstream.xml new file mode 100644 index 0000000..f4367d7 --- /dev/null +++ b/docs/reference/pygio-fileoutputstream.xml @@ -0,0 +1,257 @@ + + + + + + gio.FileOutputStream + Base class for implementing streaming input + + + + Synopsis + + + gio.FileOutputStream + gio.OutputStream + + + get_etag + + + + query_info + attributes + cancellableNone + + + query_info_async + attributes + callback + io_priorityglib.PRIORITY_DEFAULT + cancellableNone + user_dataNone + + + query_info_finish + result + + + + + + + + Ancestry + ++-- gobject.GObject + +-- gio.OutputStream + +-- gio.FileOutputStream + + + + + + Implemented Interfaces + + gio.FileOutputStream + implements + gio.Seekable + + + + + Description + + + gio.FileOutputStream + provides output streams that write their content to a file. + + + gio.FileOutputStream + implements gio.Seekable, + which allows the output stream to jump to arbitrary positions in the file and to truncate + the file, provided the filesystem of the file supports these operations. In addition to the + generic gio.Seekable. API, + gio.FileOutputStream + has its own API for seeking and positioning. To find the position of a file output stream, use + gio.Seekable.tell(). + To find out if a file output stream supports seeking, use + gio.Seekable.can_seek(). + To position a file output stream, use + gio.Seekable.seek(). + To find out if a file output stream supports truncating, use + gio.FileOutputStream.can_truncate(). + To truncate a file output stream, use + gio.Seekable.truncate(). + + + + + Methods + + + gio.FileOutputStream.get_etag + + + get_etag + + + + + + Returns : + the entity tag for the stream. + + + + + + The get_etag() method 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. + + + + + gio.FileOutputStream.query_info + + + query_info + attributes + cancellableNone + + + + + attributes : + a file attribute query string. + + + + cancellable : + optional + gio.Cancellable + object, None to ignore. + + + + Returns : + a gio.FileInfo, + or None on error. + + + + + + The query_info() method 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 + gio.FileOutputStream.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 gio.ERROR_PENDING. + + + Can fail if the stream was already closed (with error being set to gio.ERROR_CLOSED), + the stream has pending operations (with error being set to gio.ERROR_PENDING), or + if querying info is not supported for the stream's interface (with error being set to + gio.ERROR_NOT_SUPPORTED). In all cases of failure, NULL will be returned. + + + 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 gio.ERROR_CANCELLED will be set, and None will be returned. + + + + + gio.FileOutputStream.query_info_async + + + query_info_async + attributes + callback + io_priorityglib.PRIORITY_DEFAULT + cancellableNone + user_dataNone + + + + + attributes : + a file attribute query string. + + + + callback : + a GAsyncReadyCallback to call when the request is satisfied. + + + + io_priority : + the + + of the request. + + + + cancellable : + optional + gio.Cancellable + object, None to ignore. + + + user_data : + the data to pass to callback function. + + + + + + The query_info_async() method queries the stream + information asynchronously. When the operation is finished callback will be + called. You can then call + gio.FileOutputStream.query_info_finish() + to get the result of the operation. + + + For the synchronous version of this function, see + gio.FileOutputStream.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 gio.ERROR_CANCELLED will be set + + + + + gio.FileOutputStream.query_info_finish + + + query_info_finish + result + + + + + result : + a gio.AsyncResult. + + + + Returns : + a gio.FileInfo, + or None on error. + + + + + + The query_info_finish() method finishes an asynchronous + file append operation started with + gio.FileOutputStream.query_info_async(). + + + + -- cgit