From f2ab953f48ab69a7a205578f4cc37e289e962ee1 Mon Sep 17 00:00:00 2001 From: Gian Mario Tagliaretti Date: Sat, 11 Apr 2009 08:18:40 +0000 Subject: Add gio.File and gio.Seekable in docs, gio.File it's not yet completed 2009-04-11 Gian Mario Tagliaretti * docs/Makefile.am: * docs/reference/pygio-classes.xml: * docs/reference/pygio-constants.xml: * docs/reference/pygio-file.xml: * docs/reference/pygio-seekable.xml: Add gio.File and gio.Seekable in docs, gio.File it's not yet completed only the index is. svn path=/trunk/; revision=1058 --- docs/reference/pygio-seekable.xml | 231 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 231 insertions(+) create mode 100644 docs/reference/pygio-seekable.xml (limited to 'docs/reference/pygio-seekable.xml') diff --git a/docs/reference/pygio-seekable.xml b/docs/reference/pygio-seekable.xml new file mode 100644 index 0000000..1081143 --- /dev/null +++ b/docs/reference/pygio-seekable.xml @@ -0,0 +1,231 @@ + + + + + + gio.Seekable + Stream seeking interface. + + + + Synopsis + + + gio.Seekable + gobject.GInterface + + + tell + + + + can_seek + + + + seek + offset + type0 + cancellableNone + + + + can_truncate + + + + truncate + offset + cancellableNone + + + + + + + + Ancestry + ++-- gobject.GInterface + +-- gio.Seekable + + + + + + Known Implementation + + gio.Seekable is implemented by + gio.FileOutputStream, + gio.MemoryInputStream, + gio.FileInputStream and + gio.MemoryOutputStream. + + + + + Description + + + gio.Seekable + is implemented by streams (implementations of + gio.InputStream or + gio.OutputStream) + that support seeking. + + + + + Methods + + + gio.Seekable.tell + + + tell + + + + + Returns : + + the offset from the beginning of the buffer + + + + + + Tells the current position within the stream. + + + + + gio.Seekable.can_seek + + + can_seek + + + + + Returns : + True if this + gio.Seekable can be seeked with + the seek() method, False + if not. + + + + + The can_seek() method checks if the + seek() + can be used on this gio.Seekable. + + + + gio.Seekable.seek + + + seek + offset + type0 + cancellableNone + + + + + offset : + the offset that is added to the position determined by the type parameter. + + + + type : + 0=current position, 1=start of the file, 2=end of the file. + + + cancellable : + a gio.Cancellable + or None. + + + Returns : + True on successful seek, + False otherwise. + + + + + + Seeks in the stream by the given offset, modified by type. + + + If cancellable is not None, then the + operation can be cancelled by triggering the cancellable object from another thread. + + + + gio.Seekable.can_truncate + + + can_truncate + + + + + Returns : + True if this + gio.Seekable can be truncated with + the truncate() method, False + if not. + + + + + The can_truncate() method checks if the + truncate() + can be used on this gio.Seekable. + + + + gio.Seekable.truncate + + + truncate + offset + cancellableNone + + + + + offset : + the offset at which the stream should be truncated + + + + cancellable : + a gio.Cancellable + or None. + + + Returns : + True if successful, + False otherwise. + + + + + + Truncates a stream with a given offset. + + + If cancellable is not None, then the + operation can be cancelled by triggering the cancellable object from another thread. + + + If an operation was partially finished when the operation was cancelled the + partial result will be returned, without an error. + + + + -- cgit