Blame docs/reference/gio/html/GFileIOStream.html

Packit ae235b
Packit ae235b
<html>
Packit ae235b
<head>
Packit ae235b
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
Packit ae235b
<title>GFileIOStream: GIO Reference Manual</title>
Packit ae235b
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
Packit ae235b
<link rel="home" href="index.html" title="GIO Reference Manual">
Packit ae235b
<link rel="up" href="streaming.html" title="Streaming I/O">
Packit ae235b
<link rel="prev" href="GFileOutputStream.html" title="GFileOutputStream">
Packit ae235b
<link rel="next" href="GFileDescriptorBased.html" title="GFileDescriptorBased">
Packit ae235b
<meta name="generator" content="GTK-Doc V1.27 (XML mode)">
Packit ae235b
<link rel="stylesheet" href="style.css" type="text/css">
Packit ae235b
</head>
Packit ae235b
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
Packit ae235b
Packit ae235b
Packit ae235b
Top  | 
Packit ae235b
                  Description  | 
Packit ae235b
                  Object Hierarchy  | 
Packit ae235b
                  Implemented Interfaces
Packit ae235b
Packit ae235b
Home
Packit ae235b
Up
Packit ae235b
Prev
Packit ae235b
Next
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

GFileIOStream

Packit ae235b

GFileIOStream — File read and write streaming operations

Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Functions

Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
char *
Packit ae235b
Packit ae235b
Packit ae235b
g_file_io_stream_get_etag ()
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
GFileInfo *
Packit ae235b
Packit ae235b
Packit ae235b
g_file_io_stream_query_info ()
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
void
Packit ae235b
Packit ae235b
Packit ae235b
g_file_io_stream_query_info_async ()
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
GFileInfo *
Packit ae235b
Packit ae235b
Packit ae235b
g_file_io_stream_query_info_finish ()
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Types and Values

Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
 
Packit ae235b
GFileIOStream
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Object Hierarchy

Packit ae235b
    GObject
Packit ae235b
    ╰── GIOStream
Packit ae235b
        ╰── GFileIOStream
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Implemented Interfaces

Packit ae235b

Packit ae235b
GFileIOStream implements
Packit ae235b
 GSeekable.

Packit ae235b
Packit ae235b
Packit ae235b

Includes

Packit ae235b
#include <gio/gio.h>
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Description

Packit ae235b

GFileIOStream provides io streams that both read and write to the same

Packit ae235b
file handle.

Packit ae235b

GFileIOStream implements GSeekable, which allows the io

Packit ae235b
stream to jump to arbitrary positions in the file and to truncate
Packit ae235b
the file, provided the filesystem of the file supports these
Packit ae235b
operations.

Packit ae235b

To find the position of a file io stream, use

Packit ae235b
g_seekable_tell().

Packit ae235b

To find out if a file io stream supports seeking, use g_seekable_can_seek().

Packit ae235b
To position a file io stream, use g_seekable_seek().
Packit ae235b
To find out if a file io stream supports truncating, use
Packit ae235b
g_seekable_can_truncate(). To truncate a file io
Packit ae235b
stream, use g_seekable_truncate().

Packit ae235b

The default implementation of all the GFileIOStream operations

Packit ae235b
and the implementation of GSeekable just call into the same operations
Packit ae235b
on the output stream.

Packit ae235b
Packit ae235b
Packit ae235b

Functions

Packit ae235b
Packit ae235b

g_file_io_stream_get_etag ()

Packit ae235b
char *
Packit ae235b
g_file_io_stream_get_etag (GFileIOStream *stream);
Packit ae235b

Gets the entity tag for the file when it has been written.

Packit ae235b
This must be called after the stream has been written
Packit ae235b
and closed, as the etag can change while writing.

Packit ae235b
Packit ae235b

Parameters

Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

stream

Packit ae235b

a GFileIOStream.

Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Returns

Packit ae235b

the entity tag for the stream.

Packit ae235b
Packit ae235b

Since: 2.22

Packit ae235b
Packit ae235b

Packit ae235b
Packit ae235b

g_file_io_stream_query_info ()

Packit ae235b
GFileInfo *
Packit ae235b
g_file_io_stream_query_info (GFileIOStream *stream,
Packit ae235b
                             const char *attributes,
Packit ae235b
                             GCancellable *cancellable,
Packit ae235b
                             GError **error);
Packit ae235b

Queries a file io stream for the given attributes

Packit ae235b
.
Packit ae235b
This function blocks while querying the stream. For the asynchronous
Packit ae235b
version of this function, see g_file_io_stream_query_info_async().
Packit ae235b
While the stream is blocked, the stream will set the pending flag
Packit ae235b
internally, and any other operations on the stream will fail with
Packit ae235b
G_IO_ERROR_PENDING.

Packit ae235b

Can fail if the stream was already closed (with error

Packit ae235b
 being set to
Packit ae235b
G_IO_ERROR_CLOSED), the stream has pending operations (with error
Packit ae235b
 being
Packit ae235b
set to G_IO_ERROR_PENDING), or if querying info is not supported for
Packit ae235b
the stream's interface (with error
Packit ae235b
 being set to G_IO_ERROR_NOT_SUPPORTED). I
Packit ae235b
all cases of failure, NULL will be returned.

Packit ae235b

If cancellable

Packit ae235b
 is not NULL, then the operation can be cancelled by
Packit ae235b
triggering the cancellable object from another thread. If the operation
Packit ae235b
was cancelled, the error G_IO_ERROR_CANCELLED will be set, and NULL will
Packit ae235b
be returned.

Packit ae235b
Packit ae235b

Parameters

Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

stream

Packit ae235b

a GFileIOStream.

Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b

attributes

Packit ae235b

a file attribute query string.

Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b

cancellable

Packit ae235b

optional GCancellable object, NULL to ignore.

Packit ae235b
[nullable]
Packit ae235b
Packit ae235b
Packit ae235b

error

Packit ae235b

a GError, NULL to ignore.

Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Returns

Packit ae235b

a GFileInfo for the stream

Packit ae235b
, or NULL on error. 

Packit ae235b

[transfer full]

Packit ae235b
Packit ae235b

Since: 2.22

Packit ae235b
Packit ae235b

Packit ae235b
Packit ae235b

g_file_io_stream_query_info_async ()

Packit ae235b
void
Packit ae235b
g_file_io_stream_query_info_async (GFileIOStream *stream,
Packit ae235b
                                   const char *attributes,
Packit ae235b
                                   int io_priority,
Packit ae235b
                                   GCancellable *cancellable,
Packit ae235b
                                   GAsyncReadyCallback callback,
Packit ae235b
                                   gpointer user_data);
Packit ae235b

Asynchronously queries the stream

Packit ae235b
 for a GFileInfo. When completed,
Packit ae235b
callback
Packit ae235b
 will be called with a GAsyncResult which can be used to
Packit ae235b
finish the operation with g_file_io_stream_query_info_finish().

Packit ae235b

For the synchronous version of this function, see

Packit ae235b
g_file_io_stream_query_info().

Packit ae235b
Packit ae235b

Parameters

Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

stream

Packit ae235b

a GFileIOStream.

Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b

attributes

Packit ae235b

a file attribute query string.

Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b

io_priority

Packit ae235b

the I/O priority of the request

Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b

cancellable

Packit ae235b

optional GCancellable object, NULL to ignore.

Packit ae235b
[nullable]
Packit ae235b
Packit ae235b
Packit ae235b

callback

Packit ae235b

callback to call when the request is satisfied.

Packit ae235b
[scope async]
Packit ae235b
Packit ae235b
Packit ae235b

user_data

Packit ae235b

the data to pass to callback function.

Packit ae235b
[closure]
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Since: 2.22

Packit ae235b
Packit ae235b

Packit ae235b
Packit ae235b

g_file_io_stream_query_info_finish ()

Packit ae235b
GFileInfo *
Packit ae235b
g_file_io_stream_query_info_finish (GFileIOStream *stream,
Packit ae235b
                                    GAsyncResult *result,
Packit ae235b
                                    GError **error);
Packit ae235b

Finalizes the asynchronous query started

Packit ae235b
by g_file_io_stream_query_info_async().

Packit ae235b
Packit ae235b

Parameters

Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

stream

Packit ae235b

a GFileIOStream.

Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b

result

Packit ae235b

a GAsyncResult.

Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b

error

Packit ae235b

a GError, NULL to ignore.

Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Returns

Packit ae235b

A GFileInfo for the finished query.

Packit ae235b

[transfer full]

Packit ae235b
Packit ae235b

Since: 2.22

Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Types and Values

Packit ae235b
Packit ae235b

GFileIOStream

Packit ae235b
typedef struct _GFileIOStream GFileIOStream;
Packit ae235b

A subclass of GIOStream for opened files. This adds

Packit ae235b
a few file-specific operations and seeking and truncating.

Packit ae235b

GFileIOStream implements GSeekable.

Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

See Also

Packit ae235b

GIOStream, GFileInputStream, GFileOutputStream, GSeekable

Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Generated by GTK-Doc V1.27
Packit ae235b
</body>
Packit ae235b
</html>