It derives from <GOutputStream>.
<GFileOutputStream> provides output
streams that write their content to a file.
<GFileOutputStream> implements
<GSeekable>, 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.
To find the position of a file output stream, use seekable:tell. To find out if a file output stream supports
seeking, use seekable:can-seek?.To
position a file output stream, use seekable:seek?. To find out if a file output stream supports
truncating, use seekable:can-truncate?. To truncate a file output
stream, use seekable:truncate?.
parent-instanceGets 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.
Passed: a <GFileOutputStream>.
Returned: a string, or #f.
the entity tag for the stream.
Queries a file output stream for the given attributes. This
function blocks while querying the stream. For the asynchronous version
of this function, see 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
pending.
Can fail if the stream was already closed (with error being set to
closed), the stream has pending operations
(with error being set to pending), or if
querying info is not supported for the stream’s interface (with
error being set to not-supported). In
all cases of failure, #f will be returned.
If cancellable is not #f, then the operation can be
cancelled by triggering the cancellable object from another thread. If
the operation was cancelled, the error
cancelled will be set, and #f will be
returned.
Passed: a <GFileOutputStream>.
Passed: a string.
a file attribute query string.
Passed, or left out: a <GCancellable>, or
#f.
optional <GCancellable> object, #f to
ignore.
Returned: a <GFileInfo>.
a <GFileInfo> for the self, or #f on
error.
Asynchronously queries the self for a
<GFileInfo>. When completed, callback will
be called with a <GAsyncResult> which can be
used to finish the operation with file-output-stream:query-info-finish.
For the synchronous version of this function, see
file-output-stream:query-info.
Passed: a <GFileOutputStream>.
Passed: a string.
a file attribute query string.
Passed: a 32-bit integer.
the I/O priority of the request
Passed, or left out: a <GCancellable>, or
#f.
optional <GCancellable> object, #f to
ignore.
Passed, or left out: a procedure, or #f.
callback to call when the request is satisfied
See GAsyncReadyCallback for how it is
called.
Not passed: guile-gi supplies it.
the data to pass to callback function
Finalizes the asynchronous query started by file-output-stream:query-info-async.
Passed: a <GFileOutputStream>.
Passed: a <GAsyncResult>.
Returned: a <GFileInfo>.
A <GFileInfo> for the finished query.
To override it in a new class, give register-type #:vfuncs
`((can-seek . ,procedure)). The procedure is called as
(procedure self) ⇒ %return.
Passed: the class whose implementation to call:
<GFileOutputStream>, or a class that
derives from it, or its GType number.
Passed: a <GFileOutputStream>.
Returned: a boolean.
To override it in a new class, give register-type #:vfuncs
`((can-truncate . ,procedure)). The procedure is called as
(procedure self) ⇒ %return.
Passed: the class whose implementation to call:
<GFileOutputStream>, or a class that
derives from it, or its GType number.
Passed: a <GFileOutputStream>.
Returned: a boolean.
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.
To override it in a new class, give register-type #:vfuncs
`((get-etag . ,procedure)). The procedure is called as
(procedure self) ⇒ %return.
Passed: the class whose implementation to call:
<GFileOutputStream>, or a class that
derives from it, or its GType number.
Passed: a <GFileOutputStream>.
Returned: a string, or #f.
the entity tag for the stream.
Queries a file output stream for the given attributes. This
function blocks while querying the stream. For the asynchronous version
of this function, see 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
pending.
Can fail if the stream was already closed (with error being set to
closed), the stream has pending operations
(with error being set to pending), or if
querying info is not supported for the stream’s interface (with
error being set to not-supported). In
all cases of failure, #f will be returned.
If cancellable is not #f, then the operation can be
cancelled by triggering the cancellable object from another thread. If
the operation was cancelled, the error
cancelled will be set, and #f will be
returned.
To override it in a new class, give register-type #:vfuncs
`((query-info . ,procedure)). The procedure is called as
(procedure self attributes cancellable) ⇒ %return.
Passed: the class whose implementation to call:
<GFileOutputStream>, or a class that
derives from it, or its GType number.
Passed: a <GFileOutputStream>.
Passed: a string.
a file attribute query string.
Passed, or left out: a <GCancellable>, or
#f.
optional <GCancellable> object, #f to
ignore.
Returned: a <GFileInfo>.
a <GFileInfo> for the self, or #f on
error.
Asynchronously queries the self for a
<GFileInfo>. When completed, callback will
be called with a <GAsyncResult> which can be
used to finish the operation with file-output-stream:query-info-finish.
For the synchronous version of this function, see
file-output-stream:query-info.
To override it in a new class, give register-type #:vfuncs
`((query-info-async . ,procedure)). The procedure is called as
(procedure self attributes io-priority cancellable callback
user-data).
Passed: the class whose implementation to call:
<GFileOutputStream>, or a class that
derives from it, or its GType number.
Passed: a <GFileOutputStream>.
Passed: a string.
a file attribute query string.
Passed: a 32-bit integer.
the I/O priority of the request
Passed, or left out: a <GCancellable>, or
#f.
optional <GCancellable> object, #f to
ignore.
Passed, or left out: a procedure, or #f.
callback to call when the request is satisfied
See GAsyncReadyCallback for how it is
called.
Not passed: guile-gi supplies it.
the data to pass to callback function
Finalizes the asynchronous query started by file-output-stream:query-info-async.
To override it in a new class, give register-type #:vfuncs
`((query-info-finish . ,procedure)). The procedure is called as
(procedure self result) ⇒ %return.
Passed: the class whose implementation to call:
<GFileOutputStream>, or a class that
derives from it, or its GType number.
Passed: a <GFileOutputStream>.
Passed: a <GAsyncResult>.
Returned: a <GFileInfo>.
A <GFileInfo> for the finished query.
To override it in a new class, give register-type #:vfuncs
`((seek . ,procedure)). The procedure is called as (procedure
self offset type cancellable) ⇒ %return.
Passed: the class whose implementation to call:
<GFileOutputStream>, or a class that
derives from it, or its GType number.
Passed: a <GFileOutputStream>.
Passed: a 64-bit integer.
Passed: a <%GSeekType>, or one of its
symbols.
Passed, or left out: a <GCancellable>, or
#f.
Returned: a boolean.
To override it in a new class, give register-type #:vfuncs
`((tell . ,procedure)). The procedure is called as (procedure
self) ⇒ %return.
Passed: the class whose implementation to call:
<GFileOutputStream>, or a class that
derives from it, or its GType number.
Passed: a <GFileOutputStream>.
Returned: a 64-bit integer.
To override it in a new class, give register-type #:vfuncs
`((truncate-fn . ,procedure)). The procedure is called as
(procedure self size cancellable) ⇒ %return.
Passed: the class whose implementation to call:
<GFileOutputStream>, or a class that
derives from it, or its GType number.
Passed: a <GFileOutputStream>.
Passed: a 64-bit integer.
Passed, or left out: a <GCancellable>, or
#f.
Returned: a boolean.