Synopsis#include <gio/gio.h> GSeekable; GSeekableIface; goffset g_seekable_tell (GSeekable *seekable); gboolean g_seekable_can_seek (GSeekable *seekable); gboolean g_seekable_seek (GSeekable *seekable, goffset offset, GSeekType type, GCancellable *cancellable, GError **error); gboolean g_seekable_can_truncate (GSeekable *seekable); gboolean g_seekable_truncate (GSeekable *seekable, goffset offset, GCancellable *cancellable, GError **error); Known ImplementationsGSeekable is implemented by GFileOutputStream, GMemoryInputStream, GFileInputStream and GMemoryOutputStream. DescriptionGSeekable is implemented by streams (implementations of GInputStream or GOutputStream) that support seeking.
DetailsGSeekableIfacetypedef struct { GTypeInterface g_iface; /* Virtual Table */ goffset (* tell) (GSeekable *seekable); gboolean (* can_seek) (GSeekable *seekable); gboolean (* seek) (GSeekable *seekable, goffset offset, GSeekType type, GCancellable *cancellable, GError **error); gboolean (* can_truncate) (GSeekable *seekable); gboolean (* truncate_fn) (GSeekable *seekable, goffset offset, GCancellable *cancellable, GError **error); /* TODO: Async seek/truncate */ } GSeekableIface; Provides an interface for implementing seekable functionality on I/O Streams.
g_seekable_tell ()goffset g_seekable_tell (GSeekable *seekable); Tells the current position within the stream.
g_seekable_can_seek ()gboolean g_seekable_can_seek (GSeekable *seekable); Tests if the stream supports the GSeekableIface.
g_seekable_seek ()gboolean g_seekable_seek (GSeekable *seekable, goffset offset, GSeekType type, GCancellable *cancellable, GError **error);
Seeks in the stream by the given
If
g_seekable_can_truncate ()gboolean g_seekable_can_truncate (GSeekable *seekable); Tests if the stream can be truncated.
g_seekable_truncate ()gboolean g_seekable_truncate (GSeekable *seekable, goffset offset, GCancellable *cancellable, GError **error); Truncates a stream with a given offset.
If
|