Local file implementation of GFileIOStream and ops

This implements all the GIOStream file ops for local files.
We use the "fallback to output stream" for all GFileIOStream ops.
Some helpers stuff was added to the local input and output streams
so they could be reused.
This commit is contained in:
Alexander Larsson
2009-05-13 13:03:47 +02:00
parent 7a2d4889b5
commit 14d58d51a3
8 changed files with 385 additions and 16 deletions

View File

@@ -52,7 +52,20 @@ struct _GLocalFileOutputStreamClass
};
GType _g_local_file_output_stream_get_type (void) G_GNUC_CONST;
int _g_local_file_output_stream_get_fd (GLocalFileOutputStream *out);
void _g_local_file_output_stream_set_do_close (GLocalFileOutputStream *out,
gboolean do_close);
gboolean _g_local_file_output_stream_really_close (GLocalFileOutputStream *out,
GCancellable *cancellable,
GError **error);
GFileOutputStream * _g_local_file_output_stream_open (const char *filename,
gboolean readable,
GCancellable *cancellable,
GError **error);
GFileOutputStream * _g_local_file_output_stream_create (const char *filename,
gboolean readable,
GFileCreateFlags flags,
GCancellable *cancellable,
GError **error);
@@ -61,6 +74,7 @@ GFileOutputStream * _g_local_file_output_stream_append (const char *file
GCancellable *cancellable,
GError **error);
GFileOutputStream * _g_local_file_output_stream_replace (const char *filename,
gboolean readable,
const char *etag,
gboolean create_backup,
GFileCreateFlags flags,