1.35 <GFileInputStream>

Class: <GFileInputStream>

It derives from <GInputStream>.

<GFileInputStream> provides input streams that take their content from a file.

<GFileInputStream> implements <GSeekable>, which allows the input stream to jump to arbitrary positions in the file, provided the filesystem of the file allows it. To find the position of a file input stream, use seekable:tell. To find out if a file input stream supports seeking, use seekable:do-can-seek. To position a file input stream, use seekable:do-seek.

Fields

parent-instance

Procedures

Method: file-input-stream:query-info self attributes [cancellable] ⇒ %return
Method: query-info self attributes [cancellable] ⇒ %return

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 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 pending.

self

Passed: a <GFileInputStream>.

a <GFileInputStream>.

attributes

Passed: a string.

a file attribute query string.

cancellable

Passed, or left out: a <GCancellable>, or #f.

optional <GCancellable> object, #f to ignore.

%return

Returned: a <GFileInfo>.

a <GFileInfo>, or #f on error.

Method: file-input-stream:query-info-async self attributes io-priority [cancellable] [callback]
Method: query-info-async self attributes io-priority [cancellable] [callback]

Queries the stream information asynchronously. When the operation is finished callback will be called. You can then call file-input-stream:query-info-finish to get the result of the operation.

For the synchronous version of this function, see file-input-stream:query-info.

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

self

Passed: a <GFileInputStream>.

a <GFileInputStream>.

attributes

Passed: a string.

a file attribute query string.

io-priority

Passed: a 32-bit integer.

the I/O priority of the request

cancellable

Passed, or left out: a <GCancellable>, or #f.

optional <GCancellable> object, #f to ignore.

callback

Passed, or left out: a procedure, or #f.

a GAsyncReadyCallback to call when the request is satisfied

See GAsyncReadyCallback for how it is called.

user-data

Not passed: guile-gi supplies it.

the data to pass to callback function

Method: file-input-stream:query-info-finish self result ⇒ %return
Method: query-info-finish self result ⇒ %return

Finishes an asynchronous info query operation.

self

Passed: a <GFileInputStream>.

a <GFileInputStream>.

result

Passed: a <GAsyncResult>.

a <GAsyncResult>.

%return

Returned: a <GFileInfo>.

<GFileInfo>.

Virtual methods

Virtual method: file-input-stream:do-can-seek implementor self ⇒ %return

To override it in a new class, give register-type #:vfuncs `((can-seek . ,procedure)). The procedure is called as (procedure self) ⇒ %return.

implementor

Passed: the class whose implementation to call: <GFileInputStream>, or a class that derives from it, or its GType number.

self

Passed: a <GFileInputStream>.

%return

Returned: a boolean.

Virtual method: file-input-stream:do-query-info implementor self attributes [cancellable] ⇒ %return

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 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 pending.

To override it in a new class, give register-type #:vfuncs `((query-info . ,procedure)). The procedure is called as (procedure self attributes cancellable) ⇒ %return.

implementor

Passed: the class whose implementation to call: <GFileInputStream>, or a class that derives from it, or its GType number.

self

Passed: a <GFileInputStream>.

a <GFileInputStream>.

attributes

Passed: a string.

a file attribute query string.

cancellable

Passed, or left out: a <GCancellable>, or #f.

optional <GCancellable> object, #f to ignore.

%return

Returned: a <GFileInfo>.

a <GFileInfo>, or #f on error.

Virtual method: file-input-stream:do-query-info-async implementor self attributes io-priority [cancellable] [callback]

Queries the stream information asynchronously. When the operation is finished callback will be called. You can then call file-input-stream:query-info-finish to get the result of the operation.

For the synchronous version of this function, see file-input-stream:query-info.

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

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).

implementor

Passed: the class whose implementation to call: <GFileInputStream>, or a class that derives from it, or its GType number.

self

Passed: a <GFileInputStream>.

a <GFileInputStream>.

attributes

Passed: a string.

a file attribute query string.

io-priority

Passed: a 32-bit integer.

the I/O priority of the request

cancellable

Passed, or left out: a <GCancellable>, or #f.

optional <GCancellable> object, #f to ignore.

callback

Passed, or left out: a procedure, or #f.

a GAsyncReadyCallback to call when the request is satisfied

See GAsyncReadyCallback for how it is called.

user-data

Not passed: guile-gi supplies it.

the data to pass to callback function

Virtual method: file-input-stream:do-query-info-finish implementor self result ⇒ %return

Finishes an asynchronous info query operation.

To override it in a new class, give register-type #:vfuncs `((query-info-finish . ,procedure)). The procedure is called as (procedure self result) ⇒ %return.

implementor

Passed: the class whose implementation to call: <GFileInputStream>, or a class that derives from it, or its GType number.

self

Passed: a <GFileInputStream>.

a <GFileInputStream>.

result

Passed: a <GAsyncResult>.

a <GAsyncResult>.

%return

Returned: a <GFileInfo>.

<GFileInfo>.

Virtual method: file-input-stream:do-seek implementor self offset type [cancellable] ⇒ %return

To override it in a new class, give register-type #:vfuncs `((seek . ,procedure)). The procedure is called as (procedure self offset type cancellable) ⇒ %return.

implementor

Passed: the class whose implementation to call: <GFileInputStream>, or a class that derives from it, or its GType number.

self

Passed: a <GFileInputStream>.

offset

Passed: a 64-bit integer.

type

Passed: a <%GSeekType>, or one of its symbols.

cancellable

Passed, or left out: a <GCancellable>, or #f.

%return

Returned: a boolean.

Virtual method: file-input-stream:do-tell implementor self ⇒ %return

To override it in a new class, give register-type #:vfuncs `((tell . ,procedure)). The procedure is called as (procedure self) ⇒ %return.

implementor

Passed: the class whose implementation to call: <GFileInputStream>, or a class that derives from it, or its GType number.

self

Passed: a <GFileInputStream>.

%return

Returned: a 64-bit integer.