mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-04 08:23:38 +02:00
Add GIOStream operations to GFile
g_file_open_readwrite, g_file_create_readwrite, g_file_replace_readwrite and async variants, with default implementations using threads.
This commit is contained in:
83
gio/gfile.h
83
gio/gfile.h
@@ -431,6 +431,48 @@ struct _GFileIface
|
||||
GFileMonitorFlags flags,
|
||||
GCancellable *cancellable,
|
||||
GError **error);
|
||||
|
||||
GFileIOStream * (* open_readwrite) (GFile *file,
|
||||
GCancellable *cancellable,
|
||||
GError **error);
|
||||
void (* open_readwrite_async) (GFile *file,
|
||||
int io_priority,
|
||||
GCancellable *cancellable,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data);
|
||||
GFileIOStream * (* open_readwrite_finish) (GFile *file,
|
||||
GAsyncResult *res,
|
||||
GError **error);
|
||||
GFileIOStream * (* create_readwrite) (GFile *file,
|
||||
GFileCreateFlags flags,
|
||||
GCancellable *cancellable,
|
||||
GError **error);
|
||||
void (* create_readwrite_async) (GFile *file,
|
||||
GFileCreateFlags flags,
|
||||
int io_priority,
|
||||
GCancellable *cancellable,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data);
|
||||
GFileIOStream * (* create_readwrite_finish) (GFile *file,
|
||||
GAsyncResult *res,
|
||||
GError **error);
|
||||
GFileIOStream * (* replace_readwrite) (GFile *file,
|
||||
const char *etag,
|
||||
gboolean make_backup,
|
||||
GFileCreateFlags flags,
|
||||
GCancellable *cancellable,
|
||||
GError **error);
|
||||
void (* replace_readwrite_async) (GFile *file,
|
||||
const char *etag,
|
||||
gboolean make_backup,
|
||||
GFileCreateFlags flags,
|
||||
int io_priority,
|
||||
GCancellable *cancellable,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data);
|
||||
GFileIOStream * (* replace_readwrite_finish) (GFile *file,
|
||||
GAsyncResult *res,
|
||||
GError **error);
|
||||
};
|
||||
|
||||
GType g_file_get_type (void) G_GNUC_CONST;
|
||||
@@ -517,6 +559,47 @@ void g_file_replace_async (GFile
|
||||
GFileOutputStream * g_file_replace_finish (GFile *file,
|
||||
GAsyncResult *res,
|
||||
GError **error);
|
||||
GFileIOStream * g_file_open_readwrite (GFile *file,
|
||||
GCancellable *cancellable,
|
||||
GError **error);
|
||||
void g_file_open_readwrite_async (GFile *file,
|
||||
int io_priority,
|
||||
GCancellable *cancellable,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data);
|
||||
GFileIOStream * g_file_open_readwrite_finish (GFile *file,
|
||||
GAsyncResult *res,
|
||||
GError **error);
|
||||
GFileIOStream * g_file_create_readwrite (GFile *file,
|
||||
GFileCreateFlags flags,
|
||||
GCancellable *cancellable,
|
||||
GError **error);
|
||||
void g_file_create_readwrite_async (GFile *file,
|
||||
GFileCreateFlags flags,
|
||||
int io_priority,
|
||||
GCancellable *cancellable,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data);
|
||||
GFileIOStream * g_file_create_readwrite_finish (GFile *file,
|
||||
GAsyncResult *res,
|
||||
GError **error);
|
||||
GFileIOStream * g_file_replace_readwrite (GFile *file,
|
||||
const char *etag,
|
||||
gboolean make_backup,
|
||||
GFileCreateFlags flags,
|
||||
GCancellable *cancellable,
|
||||
GError **error);
|
||||
void g_file_replace_readwrite_async (GFile *file,
|
||||
const char *etag,
|
||||
gboolean make_backup,
|
||||
GFileCreateFlags flags,
|
||||
int io_priority,
|
||||
GCancellable *cancellable,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data);
|
||||
GFileIOStream * g_file_replace_readwrite_finish (GFile *file,
|
||||
GAsyncResult *res,
|
||||
GError **error);
|
||||
gboolean g_file_query_exists (GFile *file,
|
||||
GCancellable *cancellable);
|
||||
GFileType g_file_query_file_type (GFile *file,
|
||||
|
Reference in New Issue
Block a user