summaryrefslogtreecommitdiff
path: root/gio/glocalfileoutputstream.c
diff options
context:
space:
mode:
authorThomas Hindoe Paaboel Andersen <phomes@gmail.com>2011-12-08 23:17:07 +0100
committerDan Winship <danw@gnome.org>2011-12-09 08:58:05 -0500
commit721667399a2ebc198292ecb5bfedc8f296aef04d (patch)
tree8f3c52cb347131953f289b1a049f891eef0c52df /gio/glocalfileoutputstream.c
parente50d8a11b273498407cd360330533bda80e1f38d (diff)
downloadglib-721667399a2ebc198292ecb5bfedc8f296aef04d.tar.gz
GFile: add g_file_new_temp
A convenience function that creates a temporary file and returns a GFile and GFileIOStream for it. The file is created using g_file_open_tmp. https://bugzilla.gnome.org/show_bug.cgi?id=657085
Diffstat (limited to 'gio/glocalfileoutputstream.c')
-rw-r--r--gio/glocalfileoutputstream.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/gio/glocalfileoutputstream.c b/gio/glocalfileoutputstream.c
index aff270c0c..a310fcd7d 100644
--- a/gio/glocalfileoutputstream.c
+++ b/gio/glocalfileoutputstream.c
@@ -541,6 +541,16 @@ g_local_file_output_stream_query_info (GFileOutputStream *stream,
}
GFileOutputStream *
+_g_local_file_output_stream_new (int fd)
+{
+ GLocalFileOutputStream *stream;
+
+ stream = g_object_new (G_TYPE_LOCAL_FILE_OUTPUT_STREAM, NULL);
+ stream->priv->fd = fd;
+ return G_FILE_OUTPUT_STREAM (stream);
+}
+
+GFileOutputStream *
_g_local_file_output_stream_open (const char *filename,
gboolean readable,
GCancellable *cancellable,