[glib/wip/doc-fixes: 5/33] docs: GSeekable improvements WIP



commit 559a87c618c53e2117178c704ffad63c79fa7eb4
Author: David King <amigadave amigadave com>
Date:   Sat Feb 18 08:52:38 2012 +0000

    docs: GSeekable improvements WIP

 gio/gseekable.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/gio/gseekable.c b/gio/gseekable.c
index ac77b12..0944b92 100644
--- a/gio/gseekable.c
+++ b/gio/gseekable.c
@@ -141,13 +141,17 @@ g_seekable_can_truncate (GSeekable *seekable)
 
 /**
  * g_seekable_truncate:
- * @seekable: a #GSeekable.
+ * @seekable: a #GSeekable that can be truncated. Check this with
+ * g_seekable_can_truncate().
  * @offset: a #goffset.
  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore. 
  * @error: a #GError location to store the error occurring, or %NULL to 
  * ignore.
  * 
- * Truncates a stream with a given #offset. 
+ * Truncates a stream to a given #offset. The semantics of the POSIX truncate()
+ * function are used, in that the extra data past the offset is lost if @offset
+ * is shorter than the length of the stream. If @offset is longer than the
+ * length of the stream, the extra part is filled with null bytes.
  * 
  * If @cancellable is not %NULL, then the operation can be cancelled by
  * triggering the cancellable object from another thread. If the operation



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]