It derives from <GIOStream>.
<GFileIOStream> provides I/O streams that
both read and write to the same file handle.
<GFileIOStream> implements
<GSeekable>, which allows the I/O 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 I/O stream, use seekable:tell.
To find out if a file I/O stream supports seeking, use
seekable:can-seek?. To position a file
I/O stream, use seekable:seek?. To find out
if a file I/O stream supports truncating, use seekable:can-truncate?. To truncate a file I/O stream,
use seekable:truncate?.
The default implementation of all the
<GFileIOStream> operations and the
implementation of <GSeekable> just call into the
same operations on the output stream.
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 <GFileIOStream>.
Returned: a string, or #f.
the entity tag for the stream.
Queries a file io stream for the given attributes. This function
blocks while querying the stream. For the asynchronous version of this
function, see file-iostream: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). I
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 <GFileIOStream>.
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-iostream:query-info-finish.
For the synchronous version of this function, see
file-iostream:query-info.
Passed: a <GFileIOStream>.
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.
a GAsyncReadyCallback 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-iostream:query-info-async.
Passed: a <GFileIOStream>.
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:
<GFileIOStream>, or a class that derives from
it, or its GType number.
Passed: a <GFileIOStream>.
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:
<GFileIOStream>, or a class that derives from
it, or its GType number.
Passed: a <GFileIOStream>.
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:
<GFileIOStream>, or a class that derives from
it, or its GType number.
Passed: a <GFileIOStream>.
Returned: a string, or #f.
the entity tag for the stream.
Queries a file io stream for the given attributes. This function
blocks while querying the stream. For the asynchronous version of this
function, see file-iostream: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). I
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:
<GFileIOStream>, or a class that derives from
it, or its GType number.
Passed: a <GFileIOStream>.
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-iostream:query-info-finish.
For the synchronous version of this function, see
file-iostream: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:
<GFileIOStream>, or a class that derives from
it, or its GType number.
Passed: a <GFileIOStream>.
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.
a GAsyncReadyCallback 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-iostream: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:
<GFileIOStream>, or a class that derives from
it, or its GType number.
Passed: a <GFileIOStream>.
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:
<GFileIOStream>, or a class that derives from
it, or its GType number.
Passed: a <GFileIOStream>.
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:
<GFileIOStream>, or a class that derives from
it, or its GType number.
Passed: a <GFileIOStream>.
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:
<GFileIOStream>, or a class that derives from
it, or its GType number.
Passed: a <GFileIOStream>.
Passed: a 64-bit integer.
Passed, or left out: a <GCancellable>, or
#f.
Returned: a boolean.