mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-09-28 01:57:14 +02:00
Coding style fixups
svn path=/trunk/; revision=5993
This commit is contained in:
@@ -1,3 +1,7 @@
|
|||||||
|
2007-11-28 Matthias Clasen <mclasen@redhat.com>
|
||||||
|
|
||||||
|
* *.c: Coding style fixups
|
||||||
|
|
||||||
2007-11-28 Matthias Clasen <mclasen@redhat.com>
|
2007-11-28 Matthias Clasen <mclasen@redhat.com>
|
||||||
|
|
||||||
* inotify/inotify-helper.c: Don't export the lock from libgio.
|
* inotify/inotify-helper.c: Don't export the lock from libgio.
|
||||||
|
@@ -301,7 +301,10 @@ g_app_info_add_supports_type (GAppInfo *appinfo,
|
|||||||
if (iface->add_supports_type)
|
if (iface->add_supports_type)
|
||||||
return (* iface->add_supports_type) (appinfo, content_type, error);
|
return (* iface->add_supports_type) (appinfo, content_type, error);
|
||||||
|
|
||||||
g_set_error (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED, "g_app_info_add_supports_type not supported yet");
|
g_set_error (error, G_IO_ERROR,
|
||||||
|
G_IO_ERROR_NOT_SUPPORTED,
|
||||||
|
"g_app_info_add_supports_type not supported yet");
|
||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -357,7 +360,10 @@ g_app_info_remove_supports_type (GAppInfo *appinfo,
|
|||||||
if (iface->remove_supports_type)
|
if (iface->remove_supports_type)
|
||||||
return (* iface->remove_supports_type) (appinfo, content_type, error);
|
return (* iface->remove_supports_type) (appinfo, content_type, error);
|
||||||
|
|
||||||
g_set_error (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED, "g_app_info_remove_supports_type not supported yet");
|
g_set_error (error, G_IO_ERROR,
|
||||||
|
G_IO_ERROR_NOT_SUPPORTED,
|
||||||
|
"g_app_info_remove_supports_type not supported yet");
|
||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -548,10 +554,12 @@ g_app_launch_context_get_display (GAppLaunchContext *context,
|
|||||||
* @files: a #GList of files.
|
* @files: a #GList of files.
|
||||||
*
|
*
|
||||||
* Gets the DESKTOP_STARTUP_ID for the launched application, if supported.
|
* Gets the DESKTOP_STARTUP_ID for the launched application, if supported.
|
||||||
* Startup notification IDs are defined in the FreeDesktop.Org Startup Notifications standard,
|
* Startup notification IDs are defined in the FreeDesktop.Org Startup
|
||||||
* at <ulink url="http://standards.freedesktop.org/startup-notification-spec/startup-notification-latest.txt"/>.
|
* Notifications standard, at
|
||||||
|
* <ulink url="http://standards.freedesktop.org/startup-notification-spec/startup-notification-latest.txt"/>.
|
||||||
*
|
*
|
||||||
* Returns: a startup notifaction ID for the application, or %NULL if not supported.
|
* Returns: a startup notifaction ID for the application, or %NULL if
|
||||||
|
* not supported.
|
||||||
**/
|
**/
|
||||||
char *
|
char *
|
||||||
g_app_launch_context_get_startup_notify_id (GAppLaunchContext *context,
|
g_app_launch_context_get_startup_notify_id (GAppLaunchContext *context,
|
||||||
@@ -575,10 +583,10 @@ g_app_launch_context_get_startup_notify_id (GAppLaunchContext *context,
|
|||||||
/**
|
/**
|
||||||
* g_app_launch_context_launch_failed:
|
* g_app_launch_context_launch_failed:
|
||||||
* @context: a #GAppLaunchContext.
|
* @context: a #GAppLaunchContext.
|
||||||
* @startup_notify_id: a string containing the DESKTOP_STARTUP_ID of the launched application.
|
* @startup_notify_id: a string containing the DESKTOP_STARTUP_ID
|
||||||
|
* of the launched application.
|
||||||
*
|
*
|
||||||
* TODO: what does this do? Can't find it implemented anywhere.
|
* TODO: what does this do? Can't find it implemented anywhere.
|
||||||
*
|
|
||||||
**/
|
**/
|
||||||
void
|
void
|
||||||
g_app_launch_context_launch_failed (GAppLaunchContext *context,
|
g_app_launch_context_launch_failed (GAppLaunchContext *context,
|
||||||
|
@@ -270,15 +270,14 @@ g_buffered_input_stream_get_property (GObject *object,
|
|||||||
|
|
||||||
switch (prop_id)
|
switch (prop_id)
|
||||||
{
|
{
|
||||||
|
|
||||||
case PROP_BUFSIZE:
|
case PROP_BUFSIZE:
|
||||||
g_value_set_uint (value, priv->len);
|
g_value_set_uint (value, priv->len);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@@ -333,8 +332,8 @@ g_buffered_input_stream_new (GInputStream *base_stream)
|
|||||||
* @base_stream: a #GOutputStream.
|
* @base_stream: a #GOutputStream.
|
||||||
* @size: a #gsize.
|
* @size: a #gsize.
|
||||||
*
|
*
|
||||||
* Creates a new #GBufferedInputStream from the given @base_stream, with
|
* Creates a new #GBufferedInputStream from the given @base_stream,
|
||||||
* a buffer set to @size.
|
* with a buffer set to @size.
|
||||||
*
|
*
|
||||||
* Returns: a #GInputStream.
|
* Returns: a #GInputStream.
|
||||||
**/
|
**/
|
||||||
@@ -446,7 +445,7 @@ async_fill_callback_wrapper (GObject *source_object,
|
|||||||
* g_buffered_input_stream_fill_async:
|
* g_buffered_input_stream_fill_async:
|
||||||
* @stream: #GBufferedInputStream.
|
* @stream: #GBufferedInputStream.
|
||||||
* @count: a #gssize.
|
* @count: a #gssize.
|
||||||
* @io_priority: the io priority of the request. the io priority of the request.
|
* @io_priority: the io priority of the request.
|
||||||
* @cancellable: optional #GCancellable object
|
* @cancellable: optional #GCancellable object
|
||||||
* @callback: a #GAsyncReadyCallback.
|
* @callback: a #GAsyncReadyCallback.
|
||||||
* @user_data: a #gpointer.
|
* @user_data: a #gpointer.
|
||||||
@@ -454,9 +453,7 @@ async_fill_callback_wrapper (GObject *source_object,
|
|||||||
* Reads data into @stream's buffer asynchronously, up to @count size.
|
* Reads data into @stream's buffer asynchronously, up to @count size.
|
||||||
* @io_priority can be used to prioritize reads. For the synchronous
|
* @io_priority can be used to prioritize reads. For the synchronous
|
||||||
* version of this function, see g_buffered_input_stream_fill().
|
* version of this function, see g_buffered_input_stream_fill().
|
||||||
*
|
|
||||||
**/
|
**/
|
||||||
|
|
||||||
void
|
void
|
||||||
g_buffered_input_stream_fill_async (GBufferedInputStream *stream,
|
g_buffered_input_stream_fill_async (GBufferedInputStream *stream,
|
||||||
gssize count,
|
gssize count,
|
||||||
@@ -579,8 +576,8 @@ g_buffered_input_stream_get_available (GBufferedInputStream *stream)
|
|||||||
* @offset: a #gsize.
|
* @offset: a #gsize.
|
||||||
* @count: a #gsize.
|
* @count: a #gsize.
|
||||||
*
|
*
|
||||||
* Peeks in the buffer, copying data of size @count into @buffer, offset
|
* Peeks in the buffer, copying data of size @count into @buffer,
|
||||||
* @offset bytes.
|
* offset @offset bytes.
|
||||||
*
|
*
|
||||||
* Returns: a #gsize of the number of bytes peeked, or %-1 on error.
|
* Returns: a #gsize of the number of bytes peeked, or %-1 on error.
|
||||||
**/
|
**/
|
||||||
@@ -629,9 +626,8 @@ g_buffered_input_stream_peek_buffer (GBufferedInputStream *stream,
|
|||||||
|
|
||||||
priv = stream->priv;
|
priv = stream->priv;
|
||||||
|
|
||||||
if (count) {
|
if (count)
|
||||||
*count = priv->end - priv->pos;
|
*count = priv->end - priv->pos;
|
||||||
}
|
|
||||||
|
|
||||||
return priv->buffer + priv->pos;
|
return priv->buffer + priv->pos;
|
||||||
}
|
}
|
||||||
@@ -646,9 +642,7 @@ compact_buffer (GBufferedInputStream *stream)
|
|||||||
|
|
||||||
current_size = priv->end - priv->pos;
|
current_size = priv->end - priv->pos;
|
||||||
|
|
||||||
g_memmove (priv->buffer,
|
g_memmove (priv->buffer, priv->buffer + priv->pos, current_size);
|
||||||
priv->buffer + priv->pos,
|
|
||||||
current_size);
|
|
||||||
|
|
||||||
priv->pos = 0;
|
priv->pos = 0;
|
||||||
priv->end = current_size;
|
priv->end = current_size;
|
||||||
@@ -715,7 +709,9 @@ g_buffered_input_stream_skip (GInputStream *stream,
|
|||||||
return count;
|
return count;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Full request not available, skip all currently availbile and request refill for more */
|
/* Full request not available, skip all currently available and
|
||||||
|
* request refill for more
|
||||||
|
*/
|
||||||
|
|
||||||
priv->pos = 0;
|
priv->pos = 0;
|
||||||
priv->end = 0;
|
priv->end = 0;
|
||||||
@@ -1364,5 +1360,3 @@ g_buffered_input_stream_skip_finish (GInputStream *stream,
|
|||||||
|
|
||||||
#define __G_BUFFERED_INPUT_STREAM_C__
|
#define __G_BUFFERED_INPUT_STREAM_C__
|
||||||
#include "gioaliasdef.c"
|
#include "gioaliasdef.c"
|
||||||
|
|
||||||
/* vim: ts=2 sw=2 et */
|
|
||||||
|
@@ -762,5 +762,3 @@ g_buffered_output_stream_close_finish (GOutputStream *stream,
|
|||||||
|
|
||||||
#define __G_BUFFERED_OUTPUT_STREAM_C__
|
#define __G_BUFFERED_OUTPUT_STREAM_C__
|
||||||
#include "gioaliasdef.c"
|
#include "gioaliasdef.c"
|
||||||
|
|
||||||
/* vim: ts=2 sw=2 et */
|
|
||||||
|
@@ -204,7 +204,8 @@ g_content_type_can_be_executable (const char *type)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
looks_like_text (const guchar *data, gsize data_size)
|
looks_like_text (const guchar *data,
|
||||||
|
gsize data_size)
|
||||||
{
|
{
|
||||||
gsize i;
|
gsize i;
|
||||||
guchar c;
|
guchar c;
|
||||||
@@ -500,7 +501,8 @@ mime_info_text (GMarkupParseContext *context,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static char *
|
static char *
|
||||||
load_comment_for_mime_helper (const char *dir, const char *basename)
|
load_comment_for_mime_helper (const char *dir,
|
||||||
|
const char *basename)
|
||||||
{
|
{
|
||||||
GMarkupParseContext *context;
|
GMarkupParseContext *context;
|
||||||
char *filename, *data;
|
char *filename, *data;
|
||||||
@@ -788,7 +790,9 @@ foreach_mimetype (gpointer key,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
enumerate_mimetypes_subdir (const char *dir, const char *prefix, GHashTable *mimetypes)
|
enumerate_mimetypes_subdir (const char *dir,
|
||||||
|
const char *prefix,
|
||||||
|
GHashTable *mimetypes)
|
||||||
{
|
{
|
||||||
DIR *d;
|
DIR *d;
|
||||||
struct dirent *ent;
|
struct dirent *ent;
|
||||||
@@ -810,7 +814,8 @@ enumerate_mimetypes_subdir (const char *dir, const char *prefix, GHashTable *mim
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
enumerate_mimetypes_dir (const char *dir, GHashTable *mimetypes)
|
enumerate_mimetypes_dir (const char *dir,
|
||||||
|
GHashTable *mimetypes)
|
||||||
{
|
{
|
||||||
DIR *d;
|
DIR *d;
|
||||||
struct dirent *ent;
|
struct dirent *ent;
|
||||||
|
@@ -108,7 +108,6 @@ g_data_input_stream_get_property (GObject *object,
|
|||||||
|
|
||||||
switch (prop_id)
|
switch (prop_id)
|
||||||
{
|
{
|
||||||
|
|
||||||
default:
|
default:
|
||||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
||||||
break;
|
break;
|
||||||
|
@@ -87,12 +87,10 @@ g_data_output_stream_set_property (GObject *object,
|
|||||||
|
|
||||||
switch (prop_id)
|
switch (prop_id)
|
||||||
{
|
{
|
||||||
|
|
||||||
default:
|
default:
|
||||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@@ -109,13 +107,12 @@ g_data_output_stream_get_property (GObject *object,
|
|||||||
|
|
||||||
switch (prop_id)
|
switch (prop_id)
|
||||||
{
|
{
|
||||||
|
|
||||||
default:
|
default:
|
||||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
g_data_output_stream_init (GDataOutputStream *stream)
|
g_data_output_stream_init (GDataOutputStream *stream)
|
||||||
{
|
{
|
||||||
@@ -154,7 +151,6 @@ g_data_output_stream_new (GOutputStream *base_stream)
|
|||||||
* @order: a %GDataStreamByteOrder.
|
* @order: a %GDataStreamByteOrder.
|
||||||
*
|
*
|
||||||
* Sets the byte order of the data output stream to @order.
|
* Sets the byte order of the data output stream to @order.
|
||||||
*
|
|
||||||
**/
|
**/
|
||||||
void
|
void
|
||||||
g_data_output_stream_set_byte_order (GDataOutputStream *stream,
|
g_data_output_stream_set_byte_order (GDataOutputStream *stream,
|
||||||
|
@@ -449,7 +449,10 @@ expand_macro_single (char macro, GFile *file)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
expand_macro (char macro, GString *exec, GDesktopAppInfo *info, GList **file_list)
|
expand_macro (char macro,
|
||||||
|
GString *exec,
|
||||||
|
GDesktopAppInfo *info,
|
||||||
|
GList **file_list)
|
||||||
{
|
{
|
||||||
GList *files = *file_list;
|
GList *files = *file_list;
|
||||||
char *expanded;
|
char *expanded;
|
||||||
@@ -1000,13 +1003,9 @@ ensure_dir (DirType type,
|
|||||||
int err;
|
int err;
|
||||||
|
|
||||||
if (type == APP_DIR)
|
if (type == APP_DIR)
|
||||||
{
|
|
||||||
path = g_build_filename (g_get_user_data_dir (), "applications", NULL);
|
path = g_build_filename (g_get_user_data_dir (), "applications", NULL);
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
|
||||||
path = g_build_filename (g_get_user_data_dir (), "mime", "packages", NULL);
|
path = g_build_filename (g_get_user_data_dir (), "mime", "packages", NULL);
|
||||||
}
|
|
||||||
|
|
||||||
errno = 0;
|
errno = 0;
|
||||||
if (g_mkdir_with_parents (path, 0700) == 0)
|
if (g_mkdir_with_parents (path, 0700) == 0)
|
||||||
@@ -1015,17 +1014,13 @@ ensure_dir (DirType type,
|
|||||||
err = errno;
|
err = errno;
|
||||||
display_name = g_filename_display_name (path);
|
display_name = g_filename_display_name (path);
|
||||||
if (type == APP_DIR)
|
if (type == APP_DIR)
|
||||||
{
|
|
||||||
g_set_error (error, G_IO_ERROR, g_io_error_from_errno (err),
|
g_set_error (error, G_IO_ERROR, g_io_error_from_errno (err),
|
||||||
_("Can't create user application configuration folder %s: %s"),
|
_("Can't create user application configuration folder %s: %s"),
|
||||||
display_name, g_strerror (err));
|
display_name, g_strerror (err));
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
|
||||||
g_set_error (error, G_IO_ERROR, g_io_error_from_errno (err),
|
g_set_error (error, G_IO_ERROR, g_io_error_from_errno (err),
|
||||||
_("Can't create user MIME configuration folder %s: %s"),
|
_("Can't create user MIME configuration folder %s: %s"),
|
||||||
display_name, g_strerror (err));
|
display_name, g_strerror (err));
|
||||||
}
|
|
||||||
|
|
||||||
g_free (display_name);
|
g_free (display_name);
|
||||||
g_free (path);
|
g_free (path);
|
||||||
@@ -1034,7 +1029,10 @@ ensure_dir (DirType type,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
update_default_list (const char *desktop_id, const char *content_type, gboolean add, GError **error)
|
update_default_list (const char *desktop_id,
|
||||||
|
const char *content_type,
|
||||||
|
gboolean add,
|
||||||
|
GError **error)
|
||||||
{
|
{
|
||||||
char *dirname, *filename;
|
char *dirname, *filename;
|
||||||
GKeyFile *key_file;
|
GKeyFile *key_file;
|
||||||
@@ -1475,13 +1473,14 @@ g_desktop_app_info_iface_init (GAppInfoIface *iface)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
app_info_in_list (GAppInfo *info, GList *l)
|
app_info_in_list (GAppInfo *info,
|
||||||
|
GList *list)
|
||||||
{
|
{
|
||||||
while (l != NULL)
|
while (list != NULL)
|
||||||
{
|
{
|
||||||
if (g_app_info_equal (info, l->data))
|
if (g_app_info_equal (info, list->data))
|
||||||
return TRUE;
|
return TRUE;
|
||||||
l = l->next;
|
list = list->next;
|
||||||
}
|
}
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
@@ -1587,7 +1586,9 @@ g_app_info_get_default_for_uri_scheme (const char *uri_scheme)
|
|||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
get_apps_from_dir (GHashTable *apps, const char *dirname, const char *prefix)
|
get_apps_from_dir (GHashTable *apps,
|
||||||
|
const char *dirname,
|
||||||
|
const char *prefix)
|
||||||
{
|
{
|
||||||
GDir *dir;
|
GDir *dir;
|
||||||
const char *basename;
|
const char *basename;
|
||||||
@@ -1724,7 +1725,9 @@ static void mime_info_cache_dir_add_desktop_entries (MimeInfoCacheDir *dir,
|
|||||||
static MimeInfoCache * mime_info_cache_new (void);
|
static MimeInfoCache * mime_info_cache_new (void);
|
||||||
|
|
||||||
static void
|
static void
|
||||||
destroy_info_cache_value (gpointer key, GList *value, gpointer data)
|
destroy_info_cache_value (gpointer key,
|
||||||
|
GList *value,
|
||||||
|
gpointer data)
|
||||||
{
|
{
|
||||||
g_list_foreach (value, (GFunc)g_free, NULL);
|
g_list_foreach (value, (GFunc)g_free, NULL);
|
||||||
g_list_free (value);
|
g_list_free (value);
|
||||||
@@ -2120,7 +2123,8 @@ mime_info_cache_reload (const char *dir)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static GList *
|
static GList *
|
||||||
append_desktop_entry (GList *list, const char *desktop_entry)
|
append_desktop_entry (GList *list,
|
||||||
|
const char *desktop_entry)
|
||||||
{
|
{
|
||||||
/* Add if not already in list, and valid */
|
/* Add if not already in list, and valid */
|
||||||
if (!g_list_find_custom (list, desktop_entry, (GCompareFunc) strcmp))
|
if (!g_list_find_custom (list, desktop_entry, (GCompareFunc) strcmp))
|
||||||
|
@@ -164,7 +164,7 @@ g_directory_monitor_init (GDirectoryMonitor *monitor)
|
|||||||
* Returns: %TRUE if the monitor was cancelled successfully. %FALSE otherwise.
|
* Returns: %TRUE if the monitor was cancelled successfully. %FALSE otherwise.
|
||||||
**/
|
**/
|
||||||
gboolean
|
gboolean
|
||||||
g_directory_monitor_cancel (GDirectoryMonitor* monitor)
|
g_directory_monitor_cancel (GDirectoryMonitor *monitor)
|
||||||
{
|
{
|
||||||
GDirectoryMonitorClass *class;
|
GDirectoryMonitorClass *class;
|
||||||
|
|
||||||
@@ -182,10 +182,11 @@ g_directory_monitor_cancel (GDirectoryMonitor* monitor)
|
|||||||
/**
|
/**
|
||||||
* g_directory_monitor_set_rate_limit:
|
* g_directory_monitor_set_rate_limit:
|
||||||
* @monitor: a #GDirectoryMonitor.
|
* @monitor: a #GDirectoryMonitor.
|
||||||
* @limit_msecs: an integer to set the limit of the directory monitor in milliseconds.
|
* @limit_msecs: an integer to set the limit of the directory monitor
|
||||||
*
|
* in milliseconds.
|
||||||
* Sets the limit of the directory monitor to watch for changes every @limit_msecs milliseconds.
|
|
||||||
*
|
*
|
||||||
|
* Sets the limit of the directory monitor to watch for changes every
|
||||||
|
* @limit_msecs milliseconds.
|
||||||
**/
|
**/
|
||||||
void
|
void
|
||||||
g_directory_monitor_set_rate_limit (GDirectoryMonitor *monitor,
|
g_directory_monitor_set_rate_limit (GDirectoryMonitor *monitor,
|
||||||
@@ -202,7 +203,8 @@ g_directory_monitor_set_rate_limit (GDirectoryMonitor *monitor,
|
|||||||
*
|
*
|
||||||
* Checks whether @monitor is cancelled.
|
* Checks whether @monitor is cancelled.
|
||||||
*
|
*
|
||||||
* Returns: %TRUE if the monitor on the directory was cancelled. %FALSE otherwise.
|
* Returns: %TRUE if the monitor on the directory was cancelled.
|
||||||
|
* %FALSE otherwise.
|
||||||
**/
|
**/
|
||||||
gboolean
|
gboolean
|
||||||
g_directory_monitor_is_cancelled (GDirectoryMonitor *monitor)
|
g_directory_monitor_is_cancelled (GDirectoryMonitor *monitor)
|
||||||
@@ -240,7 +242,8 @@ new_limiter (GDirectoryMonitor *monitor,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
rate_limiter_send_virtual_changes_done_now (GDirectoryMonitor *monitor, RateLimiter *limiter)
|
rate_limiter_send_virtual_changes_done_now (GDirectoryMonitor *monitor,
|
||||||
|
RateLimiter *limiter)
|
||||||
{
|
{
|
||||||
if (limiter->send_virtual_changes_done_at != 0)
|
if (limiter->send_virtual_changes_done_at != 0)
|
||||||
{
|
{
|
||||||
@@ -250,7 +253,9 @@ rate_limiter_send_virtual_changes_done_now (GDirectoryMonitor *monitor, RateLimi
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
rate_limiter_send_delayed_change_now (GDirectoryMonitor *monitor, RateLimiter *limiter, guint32 time_now)
|
rate_limiter_send_delayed_change_now (GDirectoryMonitor *monitor,
|
||||||
|
RateLimiter *limiter,
|
||||||
|
guint32 time_now)
|
||||||
{
|
{
|
||||||
if (limiter->send_delayed_change_at != 0)
|
if (limiter->send_delayed_change_at != 0)
|
||||||
{
|
{
|
||||||
@@ -267,7 +272,10 @@ typedef struct {
|
|||||||
} ForEachData;
|
} ForEachData;
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
calc_min_time (GDirectoryMonitor *monitor, RateLimiter *limiter, guint32 time_now, guint32 *min_time)
|
calc_min_time (GDirectoryMonitor *monitor,
|
||||||
|
RateLimiter *limiter,
|
||||||
|
guint32 time_now,
|
||||||
|
guint32 *min_time)
|
||||||
{
|
{
|
||||||
gboolean delete_me;
|
gboolean delete_me;
|
||||||
guint32 expire_at;
|
guint32 expire_at;
|
||||||
@@ -372,7 +380,8 @@ foreach_rate_limiter_update (gpointer key,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
update_rate_limiter_timeout (GDirectoryMonitor *monitor, guint new_time)
|
update_rate_limiter_timeout (GDirectoryMonitor *monitor,
|
||||||
|
guint new_time)
|
||||||
{
|
{
|
||||||
ForEachData data;
|
ForEachData data;
|
||||||
GSource *source;
|
GSource *source;
|
||||||
@@ -416,10 +425,9 @@ update_rate_limiter_timeout (GDirectoryMonitor *monitor, guint new_time)
|
|||||||
* @other_file: a #GFile.
|
* @other_file: a #GFile.
|
||||||
* @event_type: a set of #GFileMonitorEvent flags.
|
* @event_type: a set of #GFileMonitorEvent flags.
|
||||||
*
|
*
|
||||||
* Emits the GDirectoryMonitor::changed signal if a change
|
* Emits the #GDirectoryMonitor::changed signal if a change
|
||||||
* has taken place. Should be called from directory monitor
|
* has taken place. Should be called from directory monitor
|
||||||
* implementations only.
|
* implementations only.
|
||||||
*
|
|
||||||
**/
|
**/
|
||||||
void
|
void
|
||||||
g_directory_monitor_emit_event (GDirectoryMonitor *monitor,
|
g_directory_monitor_emit_event (GDirectoryMonitor *monitor,
|
||||||
|
@@ -260,7 +260,6 @@ g_drive_can_eject (GDrive *drive)
|
|||||||
* @user_data: a #gpointer.
|
* @user_data: a #gpointer.
|
||||||
*
|
*
|
||||||
* Mounts a drive.
|
* Mounts a drive.
|
||||||
*
|
|
||||||
**/
|
**/
|
||||||
void
|
void
|
||||||
g_drive_mount (GDrive *drive,
|
g_drive_mount (GDrive *drive,
|
||||||
|
@@ -70,7 +70,8 @@ static char * unescape_string (const gchar *escaped_string,
|
|||||||
const gchar *escaped_string_end,
|
const gchar *escaped_string_end,
|
||||||
const gchar *illegal_characters);
|
const gchar *illegal_characters);
|
||||||
|
|
||||||
static void g_string_append_encoded (GString *string, const char *encoded,
|
static void g_string_append_encoded (GString *string,
|
||||||
|
const char *encoded,
|
||||||
const char *reserved_chars_allowed);
|
const char *reserved_chars_allowed);
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@@ -218,7 +219,8 @@ g_dummy_file_equal (GFile *file1,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
safe_strcmp (const char *a, const char *b)
|
safe_strcmp (const char *a,
|
||||||
|
const char *b)
|
||||||
{
|
{
|
||||||
if (a == NULL)
|
if (a == NULL)
|
||||||
a = "";
|
a = "";
|
||||||
@@ -245,7 +247,8 @@ uri_same_except_path (GDecodedUri *a,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static const char *
|
static const char *
|
||||||
match_prefix (const char *path, const char *prefix)
|
match_prefix (const char *path,
|
||||||
|
const char *prefix)
|
||||||
{
|
{
|
||||||
int prefix_len;
|
int prefix_len;
|
||||||
|
|
||||||
@@ -683,7 +686,8 @@ is_valid (char c, const char *reserved_chars_allowed)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
g_string_append_encoded (GString *string, const char *encoded,
|
g_string_append_encoded (GString *string,
|
||||||
|
const char *encoded,
|
||||||
const char *reserved_chars_allowed)
|
const char *reserved_chars_allowed)
|
||||||
{
|
{
|
||||||
unsigned char c;
|
unsigned char c;
|
||||||
|
257
gio/gfile.c
257
gio/gfile.c
@@ -64,9 +64,6 @@
|
|||||||
* appended to their function names. The asynchronous I/O functions
|
* appended to their function names. The asynchronous I/O functions
|
||||||
* call a #GAsyncReadyCallback which is then used to finalize the operation,
|
* call a #GAsyncReadyCallback which is then used to finalize the operation,
|
||||||
* which is then passed to the function's matching _finish() operation.
|
* which is then passed to the function's matching _finish() operation.
|
||||||
*
|
|
||||||
*
|
|
||||||
*
|
|
||||||
**/
|
**/
|
||||||
|
|
||||||
static void g_file_base_init (gpointer g_class);
|
static void g_file_base_init (gpointer g_class);
|
||||||
@@ -247,7 +244,7 @@ g_file_is_native (GFile *file)
|
|||||||
* Checks to see if a #GFile has a given URI scheme.
|
* Checks to see if a #GFile has a given URI scheme.
|
||||||
*
|
*
|
||||||
* Returns: %TRUE if #GFile's backend supports the
|
* Returns: %TRUE if #GFile's backend supports the
|
||||||
* given URI scheme, FALSE if URI scheme is %NULL,
|
* given URI scheme, %FALSE if URI scheme is %NULL,
|
||||||
* not supported, or #GFile is invalid.
|
* not supported, or #GFile is invalid.
|
||||||
**/
|
**/
|
||||||
gboolean
|
gboolean
|
||||||
@@ -704,6 +701,8 @@ g_file_enumerate_children_async (GFile *file,
|
|||||||
* @res: a #GAsyncResult.
|
* @res: a #GAsyncResult.
|
||||||
* @error: a #GError.
|
* @error: a #GError.
|
||||||
*
|
*
|
||||||
|
* Finishes an async enumerate children operation.
|
||||||
|
*
|
||||||
* If @cancellable was not %NULL when g_file_enumerate_children_async()
|
* If @cancellable was not %NULL when g_file_enumerate_children_async()
|
||||||
* was called, then the operation could have been cancelled by triggering
|
* was called, then the operation could have been cancelled by triggering
|
||||||
* the cancellable object from another thread. If the operation was cancelled,
|
* the cancellable object from another thread. If the operation was cancelled,
|
||||||
@@ -869,6 +868,8 @@ g_file_query_info_finish (GFile *file,
|
|||||||
* @cancellable: optional #GCancellable object, %NULL to ignore.
|
* @cancellable: optional #GCancellable object, %NULL to ignore.
|
||||||
* @error: a #GError.
|
* @error: a #GError.
|
||||||
*
|
*
|
||||||
|
* Obtains attributes of a #GFile.
|
||||||
|
*
|
||||||
* If @cancellable is not %NULL, then the operation can be cancelled by
|
* If @cancellable is not %NULL, then the operation can be cancelled by
|
||||||
* triggering the cancellable object from another thread. If the operation
|
* triggering the cancellable object from another thread. If the operation
|
||||||
* was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
|
* was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
|
||||||
@@ -997,8 +998,11 @@ g_file_read (GFile *file,
|
|||||||
* @cancellable: optional #GCancellable object, %NULL to ignore.
|
* @cancellable: optional #GCancellable object, %NULL to ignore.
|
||||||
* @error: a #GError, or %NULL
|
* @error: a #GError, or %NULL
|
||||||
*
|
*
|
||||||
* If the #GFileIface for @file does not support appending to files, then
|
* Gets an output stream for appending to the file.
|
||||||
* @error will be set to %G_IO_ERROR_NOT_SUPPORTED and %NULL will be returned.
|
*
|
||||||
|
* If the #GFileIface for @file does not support appending to files,
|
||||||
|
* then @error will be set to %G_IO_ERROR_NOT_SUPPORTED and %NULL will
|
||||||
|
* be returned.
|
||||||
*
|
*
|
||||||
* If @cancellable is not %NULL, then the operation can be cancelled by
|
* If @cancellable is not %NULL, then the operation can be cancelled by
|
||||||
* triggering the cancellable object from another thread. If the operation
|
* triggering the cancellable object from another thread. If the operation
|
||||||
@@ -1039,6 +1043,8 @@ g_file_append_to (GFile *file,
|
|||||||
* @cancellable: optional #GCancellable object, %NULL to ignore.
|
* @cancellable: optional #GCancellable object, %NULL to ignore.
|
||||||
* @error: a #GError, or %NULL
|
* @error: a #GError, or %NULL
|
||||||
*
|
*
|
||||||
|
* Creates the file and returns an output stream for writing to it.
|
||||||
|
*
|
||||||
* If the #GFileIface for @file does not support creating files, then
|
* If the #GFileIface for @file does not support creating files, then
|
||||||
* @error will be set to %G_IO_ERROR_NOT_SUPPORTED and %NULL will be returned.
|
* @error will be set to %G_IO_ERROR_NOT_SUPPORTED and %NULL will be returned.
|
||||||
*
|
*
|
||||||
@@ -1079,13 +1085,17 @@ g_file_create (GFile *file,
|
|||||||
* g_file_replace:
|
* g_file_replace:
|
||||||
* @file: input #GFile.
|
* @file: input #GFile.
|
||||||
* @etag: an Entity Tag for the current #GFile.
|
* @etag: an Entity Tag for the current #GFile.
|
||||||
* @make_backup: a #gboolean.
|
* @make_backup: %TRUE if a backup should be created.
|
||||||
* @flags: a set of #GFileCreateFlags.
|
* @flags: a set of #GFileCreateFlags.
|
||||||
* @cancellable: optional #GCancellable object, %NULL to ignore.
|
* @cancellable: optional #GCancellable object, %NULL to ignore.
|
||||||
* @error: a #GError, or %NULL
|
* @error: a #GError, or %NULL
|
||||||
*
|
*
|
||||||
* If the #GFileIface for @file does not support streaming operations, then
|
* Returns an output stream for overwriting the file, possibly
|
||||||
* @error will be set to %G_IO_ERROR_NOT_SUPPORTED and %NULL will be returned.
|
* creating a backup copy of the file first.
|
||||||
|
*
|
||||||
|
* If the #GFileIface for @file does not support streaming operations,
|
||||||
|
* then @error will be set to %G_IO_ERROR_NOT_SUPPORTED and %NULL will
|
||||||
|
* be returned.
|
||||||
*
|
*
|
||||||
* If @cancellable is not %NULL, then the operation can be cancelled by
|
* If @cancellable is not %NULL, then the operation can be cancelled by
|
||||||
* triggering the cancellable object from another thread. If the operation
|
* triggering the cancellable object from another thread. If the operation
|
||||||
@@ -1093,8 +1103,9 @@ g_file_create (GFile *file,
|
|||||||
*
|
*
|
||||||
* @etag will replace the entity tag for the current file.
|
* @etag will replace the entity tag for the current file.
|
||||||
*
|
*
|
||||||
* Returns: a #GFileOutputStream or %NULL on error. If @make_backup is %TRUE,
|
* Returns: a #GFileOutputStream or %NULL on error. If @make_backup is
|
||||||
* this function will attempt to make a backup of the current file.
|
* %TRUE, this function will attempt to make a backup of the current
|
||||||
|
* file.
|
||||||
**/
|
**/
|
||||||
GFileOutputStream *
|
GFileOutputStream *
|
||||||
g_file_replace (GFile *file,
|
g_file_replace (GFile *file,
|
||||||
@@ -1137,8 +1148,9 @@ g_file_replace (GFile *file,
|
|||||||
* @callback: a #GAsyncReadyCallback.
|
* @callback: a #GAsyncReadyCallback.
|
||||||
* @user_data: a #gpointer.
|
* @user_data: a #gpointer.
|
||||||
*
|
*
|
||||||
* Asynchronously reads @file. For the synchronous version of this function,
|
* Asynchronously reads @file.
|
||||||
* see g_file_read().
|
*
|
||||||
|
* For the synchronous version of this function, see g_file_read().
|
||||||
**/
|
**/
|
||||||
void
|
void
|
||||||
g_file_read_async (GFile *file,
|
g_file_read_async (GFile *file,
|
||||||
@@ -1168,8 +1180,9 @@ g_file_read_async (GFile *file,
|
|||||||
* Finishes an asynchronous file read operation started with
|
* Finishes an asynchronous file read operation started with
|
||||||
* g_file_read_async().
|
* g_file_read_async().
|
||||||
*
|
*
|
||||||
* If the #GFileIface for @file does not support streaming operations, then
|
* If the #GFileIface for @file does not support streaming operations,
|
||||||
* @error will be set to %G_IO_ERROR_NOT_SUPPORTED and %NULL will be returned.
|
* then @error will be set to %G_IO_ERROR_NOT_SUPPORTED and %NULL will
|
||||||
|
* be returned.
|
||||||
*
|
*
|
||||||
* If @cancellable is not %NULL, then the operation can be cancelled by
|
* If @cancellable is not %NULL, then the operation can be cancelled by
|
||||||
* triggering the cancellable object from another thread. If the operation
|
* triggering the cancellable object from another thread. If the operation
|
||||||
@@ -1202,14 +1215,14 @@ g_file_read_finish (GFile *file,
|
|||||||
* g_file_append_to_async:
|
* g_file_append_to_async:
|
||||||
* @file: input #GFile.
|
* @file: input #GFile.
|
||||||
* @flags: a set of #GFileCreateFlags.
|
* @flags: a set of #GFileCreateFlags.
|
||||||
* @io_priority: the io priority of the request. the io priority of the request.
|
* @io_priority: the io priority of the request.
|
||||||
* @cancellable: optional #GCancellable object, %NULL to ignore.
|
* @cancellable: optional #GCancellable object, %NULL to ignore.
|
||||||
* @callback: a #GAsyncReadyCallback.
|
* @callback: a #GAsyncReadyCallback.
|
||||||
* @user_data: a #gpointer.
|
* @user_data: a #gpointer.
|
||||||
*
|
*
|
||||||
* Readies a file for appending data asynchronously.
|
* Readies a file for appending data asynchronously.
|
||||||
* For the synchronous version of this function, see
|
*
|
||||||
* g_file_append_to().
|
* For the synchronous version of this function, see g_file_append_to().
|
||||||
*
|
*
|
||||||
* If @cancellable is not %NULL, then the operation can be cancelled by
|
* If @cancellable is not %NULL, then the operation can be cancelled by
|
||||||
* triggering the cancellable object from another thread. If the operation
|
* triggering the cancellable object from another thread. If the operation
|
||||||
@@ -1240,7 +1253,7 @@ g_file_append_to_async (GFile *file,
|
|||||||
* g_file_append_to_finish:
|
* g_file_append_to_finish:
|
||||||
* @file: input #GFile.
|
* @file: input #GFile.
|
||||||
* @res: #GAsyncResult
|
* @res: #GAsyncResult
|
||||||
* @error: a #GError, or #NULL
|
* @error: a #GError, or %NULL
|
||||||
*
|
*
|
||||||
* Finishes appending to a file started with g_file_append_to_async().
|
* Finishes appending to a file started with g_file_append_to_async().
|
||||||
*
|
*
|
||||||
@@ -1271,13 +1284,14 @@ g_file_append_to_finish (GFile *file,
|
|||||||
* g_file_create_async:
|
* g_file_create_async:
|
||||||
* @file: input #GFile.
|
* @file: input #GFile.
|
||||||
* @flags: a set of #GFileCreateFlags.
|
* @flags: a set of #GFileCreateFlags.
|
||||||
* @io_priority: the io priority of the request. the io priority of the request.
|
* @io_priority: the io priority of the request.
|
||||||
* @cancellable: optional #GCancellable object, %NULL to ignore.
|
* @cancellable: optional #GCancellable object, %NULL to ignore.
|
||||||
* @callback: a #GAsyncReadyCallback.
|
* @callback: a #GAsyncReadyCallback.
|
||||||
* @user_data: a #gpointer.
|
* @user_data: a #gpointer.
|
||||||
*
|
*
|
||||||
* Creates a new file asynchronously. For the synchronous version of
|
* Creates a new file asynchronously.
|
||||||
* this function, see g_file_create().
|
*
|
||||||
|
* For the synchronous version of this function, see g_file_create().
|
||||||
*
|
*
|
||||||
* If @cancellable is not %NULL, then the operation can be cancelled by
|
* If @cancellable is not %NULL, then the operation can be cancelled by
|
||||||
* triggering the cancellable object from another thread. If the operation
|
* triggering the cancellable object from another thread. If the operation
|
||||||
@@ -1341,14 +1355,15 @@ g_file_create_finish (GFile *file,
|
|||||||
* @etag: an Entity Tag for the current #GFile.
|
* @etag: an Entity Tag for the current #GFile.
|
||||||
* @make_backup: a #gboolean.
|
* @make_backup: a #gboolean.
|
||||||
* @flags: a set of #GFileCreateFlags.
|
* @flags: a set of #GFileCreateFlags.
|
||||||
* @io_priority: the io priority of the request. the io priority of the request.
|
* @io_priority: the io priority of the request.
|
||||||
* @cancellable: optional #GCancellable object, %NULL to ignore.
|
* @cancellable: optional #GCancellable object, %NULL to ignore.
|
||||||
* @callback: a #GAsyncReadyCallback.
|
* @callback: a #GAsyncReadyCallback.
|
||||||
* @user_data: a #gpointer.
|
* @user_data: a #gpointer.
|
||||||
*
|
*
|
||||||
* Replaces a file's contents. For the synchronous version of this
|
* Replaces a file's contents asynchronously. If @make_backup is
|
||||||
* function, see g_file_replace(). If @make_backup is %TRUE, this function
|
* %TRUE, this function will attempt to make a backup of the current file.
|
||||||
* will attempt to make a backup of the current file.
|
*
|
||||||
|
* For the synchronous version of this function, see g_file_replace().
|
||||||
*
|
*
|
||||||
* If @cancellable is not %NULL, then the operation can be cancelled by
|
* If @cancellable is not %NULL, then the operation can be cancelled by
|
||||||
* triggering the cancellable object from another thread. If the operation
|
* triggering the cancellable object from another thread. If the operation
|
||||||
@@ -1489,9 +1504,10 @@ open_source_for_copy (GFile *source,
|
|||||||
|
|
||||||
if (my_error->domain == G_IO_ERROR && my_error->code == G_IO_ERROR_IS_DIRECTORY)
|
if (my_error->domain == G_IO_ERROR && my_error->code == G_IO_ERROR_IS_DIRECTORY)
|
||||||
{
|
{
|
||||||
/* The source is a directory, don't fail with WOULD_RECURSE immediately, as
|
/* The source is a directory, don't fail with WOULD_RECURSE immediately,
|
||||||
that is less useful to the app. Better check for errors on the target instead. */
|
* as that is less useful to the app. Better check for errors on the
|
||||||
|
* target instead.
|
||||||
|
*/
|
||||||
g_error_free (my_error);
|
g_error_free (my_error);
|
||||||
my_error = NULL;
|
my_error = NULL;
|
||||||
|
|
||||||
@@ -1522,7 +1538,9 @@ open_source_for_copy (GFile *source,
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* Error getting info from target, return that error (except for NOT_FOUND, which is no error here) */
|
/* Error getting info from target, return that error
|
||||||
|
* (except for NOT_FOUND, which is no error here)
|
||||||
|
*/
|
||||||
if (my_error->domain != G_IO_ERROR && my_error->code != G_IO_ERROR_NOT_FOUND)
|
if (my_error->domain != G_IO_ERROR && my_error->code != G_IO_ERROR_NOT_FOUND)
|
||||||
{
|
{
|
||||||
g_propagate_error (error, my_error);
|
g_propagate_error (error, my_error);
|
||||||
@@ -1541,7 +1559,8 @@ open_source_for_copy (GFile *source,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
should_copy (GFileAttributeInfo *info, gboolean as_move)
|
should_copy (GFileAttributeInfo *info,
|
||||||
|
gboolean as_move)
|
||||||
{
|
{
|
||||||
if (as_move)
|
if (as_move)
|
||||||
return info->flags & G_FILE_ATTRIBUTE_FLAGS_COPY_WHEN_MOVED;
|
return info->flags & G_FILE_ATTRIBUTE_FLAGS_COPY_WHEN_MOVED;
|
||||||
@@ -1594,7 +1613,6 @@ build_attribute_list_for_copy (GFileAttributeInfoList *attributes,
|
|||||||
}
|
}
|
||||||
|
|
||||||
return g_string_free (s, FALSE);
|
return g_string_free (s, FALSE);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
gboolean
|
gboolean
|
||||||
@@ -1624,7 +1642,8 @@ g_file_copy_attributes (GFile *source,
|
|||||||
attrs_to_read = build_attribute_list_for_copy (attributes, namespaces, as_move);
|
attrs_to_read = build_attribute_list_for_copy (attributes, namespaces, as_move);
|
||||||
|
|
||||||
/* Ignore errors here, if we can't read some info (e.g. if it doesn't exist)
|
/* Ignore errors here, if we can't read some info (e.g. if it doesn't exist)
|
||||||
we just don't copy it. */
|
* we just don't copy it.
|
||||||
|
*/
|
||||||
info = g_file_query_info (source, attrs_to_read,
|
info = g_file_query_info (source, attrs_to_read,
|
||||||
source_nofollow_symlinks ? G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS:0,
|
source_nofollow_symlinks ? G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS:0,
|
||||||
cancellable,
|
cancellable,
|
||||||
@@ -1834,9 +1853,9 @@ file_copy_fallback (GFile *source,
|
|||||||
* dir file overwr G_IO_ERROR_WOULD_RECURSE
|
* dir file overwr G_IO_ERROR_WOULD_RECURSE
|
||||||
* Docbook version below -->
|
* Docbook version below -->
|
||||||
*
|
*
|
||||||
* Copies a file or directory from @source to @destination, with the given @flags.
|
* Copies a file or directory from @source to @destination, with the given
|
||||||
* @flags should be set to %0 if not used. This operation may fail, and @error will
|
* @flags. This operation may fail, and @error will be set appropriately with
|
||||||
* be set appropriately with the given error result (see the following table).
|
* the given error result (see the following table).
|
||||||
* File copies are always asynchronous.
|
* File copies are always asynchronous.
|
||||||
*
|
*
|
||||||
* If @cancellable is not %NULL, then the operation can be cancelled by
|
* If @cancellable is not %NULL, then the operation can be cancelled by
|
||||||
@@ -1916,14 +1935,12 @@ g_file_copy (GFile *source,
|
|||||||
* g_file_move:
|
* g_file_move:
|
||||||
* @source: #GFile pointing to the source location.
|
* @source: #GFile pointing to the source location.
|
||||||
* @destination: #GFile pointing to the destination location.
|
* @destination: #GFile pointing to the destination location.
|
||||||
* @flags: #GFileCopyFlags enum.
|
* @flags: set of #GFileCopyFlags.
|
||||||
* @cancellable: optional #GCancellable object, %NULL to ignore.
|
* @cancellable: optional #GCancellable object, %NULL to ignore.
|
||||||
* @progress_callback: GFileProgressCallback function for updates.
|
* @progress_callback: #GFileProgressCallback function for updates.
|
||||||
* @progress_callback_data: gpointer to user data for the callback function.
|
* @progress_callback_data: gpointer to user data for the callback function.
|
||||||
* @error: #GError for returning error conditions, or %NULL
|
* @error: #GError for returning error conditions, or %NULL
|
||||||
*
|
*
|
||||||
* List of possible returns from g_file_move() with given source,
|
|
||||||
* destination, and flags:
|
|
||||||
* <!-- Source version
|
* <!-- Source version
|
||||||
* source dest flags results in
|
* source dest flags results in
|
||||||
* - * * G_IO_ERROR_NOT_FOUND
|
* - * * G_IO_ERROR_NOT_FOUND
|
||||||
@@ -1936,7 +1953,21 @@ g_file_copy (GFile *source,
|
|||||||
* dir * 0 G_IO_ERROR_EXISTS
|
* dir * 0 G_IO_ERROR_EXISTS
|
||||||
* dir dir overwr G_IO_ERROR_WOULD_MERGE
|
* dir dir overwr G_IO_ERROR_WOULD_MERGE
|
||||||
* dir file overwr ok || G_IO_ERROR_WOULD_RECURSE
|
* dir file overwr ok || G_IO_ERROR_WOULD_RECURSE
|
||||||
* Pretty Docbook version -->
|
* Docbook version below -->
|
||||||
|
*
|
||||||
|
* Moves a file or directory from @source to @destination, with the given
|
||||||
|
* @flags. This operation may fail, and @error will be set appropriately with
|
||||||
|
* the given error result (see the following table).
|
||||||
|
* File moves are always asynchronous.
|
||||||
|
*
|
||||||
|
* If @cancellable is not %NULL, then the operation can be cancelled by
|
||||||
|
* triggering the cancellable object from another thread. If the operation
|
||||||
|
* was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
|
||||||
|
*
|
||||||
|
* If @progress_callback is not %NULL, then the operation can be monitored by
|
||||||
|
* setting this to a #GFileProgressCallback function. @progress_callback_data
|
||||||
|
* will be passed to this function.
|
||||||
|
*
|
||||||
* <table>
|
* <table>
|
||||||
* <title>g_file_move() Error Conditions</title>
|
* <title>g_file_move() Error Conditions</title>
|
||||||
* <tgroup cols='4' align='left'><thead>
|
* <tgroup cols='4' align='left'><thead>
|
||||||
@@ -2021,6 +2052,8 @@ g_file_move (GFile *source,
|
|||||||
* @cancellable: optional #GCancellable object, %NULL to ignore.
|
* @cancellable: optional #GCancellable object, %NULL to ignore.
|
||||||
* @error: a #GError, or %NULL
|
* @error: a #GError, or %NULL
|
||||||
*
|
*
|
||||||
|
* Creates a directory.
|
||||||
|
*
|
||||||
* If @cancellable is not %NULL, then the operation can be cancelled by
|
* If @cancellable is not %NULL, then the operation can be cancelled by
|
||||||
* triggering the cancellable object from another thread. If the operation
|
* triggering the cancellable object from another thread. If the operation
|
||||||
* was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
|
* was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
|
||||||
@@ -2059,6 +2092,8 @@ g_file_make_directory (GFile *file,
|
|||||||
* @cancellable: optional #GCancellable object, %NULL to ignore.
|
* @cancellable: optional #GCancellable object, %NULL to ignore.
|
||||||
* @error: a #GError.
|
* @error: a #GError.
|
||||||
*
|
*
|
||||||
|
* Creates a symbolic link.
|
||||||
|
*
|
||||||
* If @cancellable is not %NULL, then the operation can be cancelled by
|
* If @cancellable is not %NULL, then the operation can be cancelled by
|
||||||
* triggering the cancellable object from another thread. If the operation
|
* triggering the cancellable object from another thread. If the operation
|
||||||
* was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
|
* was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
|
||||||
@@ -2147,7 +2182,8 @@ g_file_delete (GFile *file,
|
|||||||
*
|
*
|
||||||
* Sends @file to the virtual file system "Trash" location. If the
|
* Sends @file to the virtual file system "Trash" location. If the
|
||||||
* virtual file system does not have support having a "Trash" location,
|
* virtual file system does not have support having a "Trash" location,
|
||||||
* %FALSE will be returned, and @error will be set to %G_IO_ERROR_NOT_SUPPORTED.
|
* %FALSE will be returned, and @error will be set to
|
||||||
|
* %G_IO_ERROR_NOT_SUPPORTED.
|
||||||
*
|
*
|
||||||
* If @cancellable is not %NULL, then the operation can be cancelled by
|
* If @cancellable is not %NULL, then the operation can be cancelled by
|
||||||
* triggering the cancellable object from another thread. If the operation
|
* triggering the cancellable object from another thread. If the operation
|
||||||
@@ -2229,14 +2265,13 @@ g_file_set_display_name (GFile *file,
|
|||||||
* g_file_set_display_name_async:
|
* g_file_set_display_name_async:
|
||||||
* @file: input #GFile.
|
* @file: input #GFile.
|
||||||
* @display_name: a string.
|
* @display_name: a string.
|
||||||
* @io_priority: the io priority of the request. the io priority of the request.
|
* @io_priority: the io priority of the request.
|
||||||
* @cancellable: optional #GCancellable object, %NULL to ignore.
|
* @cancellable: optional #GCancellable object, %NULL to ignore.
|
||||||
* @callback: a #GAsyncReadyCallback.
|
* @callback: a #GAsyncReadyCallback.
|
||||||
* @user_data: a #gpointer.
|
* @user_data: a #gpointer.
|
||||||
*
|
*
|
||||||
* Asynchronously sets the display name for a given #GFile.
|
* Asynchronously sets the display name for a given #GFile.
|
||||||
* For the synchronous version of this function, see
|
* For the synchronous version of this function, see g_file_set_display_name().
|
||||||
* g_file_set_display_name().
|
|
||||||
*
|
*
|
||||||
* If @cancellable is not %NULL, then the operation can be cancelled by
|
* If @cancellable is not %NULL, then the operation can be cancelled by
|
||||||
* triggering the cancellable object from another thread. If the operation
|
* triggering the cancellable object from another thread. If the operation
|
||||||
@@ -2270,7 +2305,8 @@ g_file_set_display_name_async (GFile *file,
|
|||||||
* @res: a #GAsyncResult.
|
* @res: a #GAsyncResult.
|
||||||
* @error: a #GError, or %NULL
|
* @error: a #GError, or %NULL
|
||||||
*
|
*
|
||||||
* Finishes setting a display name started with g_file_set_display_name_async().
|
* Finishes setting a display name started with
|
||||||
|
* g_file_set_display_name_async().
|
||||||
*
|
*
|
||||||
* Returns: a #GFile or %NULL on error.
|
* Returns: a #GFile or %NULL on error.
|
||||||
**/
|
**/
|
||||||
@@ -2301,14 +2337,16 @@ g_file_set_display_name_finish (GFile *file,
|
|||||||
* @cancellable: optional #GCancellable object, %NULL to ignore.
|
* @cancellable: optional #GCancellable object, %NULL to ignore.
|
||||||
* @error: a #GError, or %NULL
|
* @error: a #GError, or %NULL
|
||||||
*
|
*
|
||||||
|
* Obtain the list of settable attributes for the file.
|
||||||
|
*
|
||||||
* If @cancellable is not %NULL, then the operation can be cancelled by
|
* If @cancellable is not %NULL, then the operation can be cancelled by
|
||||||
* triggering the cancellable object from another thread. If the operation
|
* triggering the cancellable object from another thread. If the operation
|
||||||
* was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
|
* was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
|
||||||
*
|
*
|
||||||
* Returns: the type and full attribute name of all the attributes that
|
* Returns: the type and full attribute name of all the attributes
|
||||||
* the file can set. This doesn't mean setting it will always succeed though,
|
* that the file can set. This doesn't mean setting it will always
|
||||||
* you might get an access failure, or some specific file may not support a
|
* succeed though, you might get an access failure, or some specific
|
||||||
* specific attribute.
|
* file may not support a specific attribute.
|
||||||
**/
|
**/
|
||||||
GFileAttributeInfoList *
|
GFileAttributeInfoList *
|
||||||
g_file_query_settable_attributes (GFile *file,
|
g_file_query_settable_attributes (GFile *file,
|
||||||
@@ -2352,6 +2390,9 @@ g_file_query_settable_attributes (GFile *file,
|
|||||||
* @cancellable: optional #GCancellable object, %NULL to ignore.
|
* @cancellable: optional #GCancellable object, %NULL to ignore.
|
||||||
* @error: a #GError, or %NULL
|
* @error: a #GError, or %NULL
|
||||||
*
|
*
|
||||||
|
* Obtain the list of attribute namespaces where new attributes
|
||||||
|
* can be created.
|
||||||
|
*
|
||||||
* If @cancellable is not %NULL, then the operation can be cancelled by
|
* If @cancellable is not %NULL, then the operation can be cancelled by
|
||||||
* triggering the cancellable object from another thread. If the operation
|
* triggering the cancellable object from another thread. If the operation
|
||||||
* was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
|
* was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
|
||||||
@@ -2483,7 +2524,11 @@ g_file_set_attributes_from_info (GFile *file,
|
|||||||
|
|
||||||
iface = G_FILE_GET_IFACE (file);
|
iface = G_FILE_GET_IFACE (file);
|
||||||
|
|
||||||
return (* iface->set_attributes_from_info) (file, info, flags, cancellable, error);
|
return (* iface->set_attributes_from_info) (file,
|
||||||
|
info,
|
||||||
|
flags,
|
||||||
|
cancellable,
|
||||||
|
error);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -2531,7 +2576,7 @@ g_file_real_set_attributes_from_info (GFile *file,
|
|||||||
* @file: input #GFile.
|
* @file: input #GFile.
|
||||||
* @info: a #GFileInfo.
|
* @info: a #GFileInfo.
|
||||||
* @flags: a #GFileQueryInfoFlags.
|
* @flags: a #GFileQueryInfoFlags.
|
||||||
* @io_priority: the io priority of the request. the io priority of the request.
|
* @io_priority: the io priority of the request.
|
||||||
* @cancellable: optional #GCancellable object, %NULL to ignore.
|
* @cancellable: optional #GCancellable object, %NULL to ignore.
|
||||||
* @callback: a #GAsyncReadyCallback.
|
* @callback: a #GAsyncReadyCallback.
|
||||||
* @user_data: a #gpointer.
|
* @user_data: a #gpointer.
|
||||||
@@ -2558,8 +2603,13 @@ g_file_set_attributes_async (GFile *file,
|
|||||||
g_return_if_fail (G_IS_FILE_INFO (info));
|
g_return_if_fail (G_IS_FILE_INFO (info));
|
||||||
|
|
||||||
iface = G_FILE_GET_IFACE (file);
|
iface = G_FILE_GET_IFACE (file);
|
||||||
(* iface->set_attributes_async) (file, info, flags, io_priority, cancellable, callback, user_data);
|
(* iface->set_attributes_async) (file,
|
||||||
|
info,
|
||||||
|
flags,
|
||||||
|
io_priority,
|
||||||
|
cancellable,
|
||||||
|
callback,
|
||||||
|
user_data);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -2585,8 +2635,8 @@ g_file_set_attributes_finish (GFile *file,
|
|||||||
g_return_val_if_fail (G_IS_ASYNC_RESULT (result), FALSE);
|
g_return_val_if_fail (G_IS_ASYNC_RESULT (result), FALSE);
|
||||||
|
|
||||||
/* No standard handling of errors here, as we must set info even
|
/* No standard handling of errors here, as we must set info even
|
||||||
on errors */
|
* on errors
|
||||||
|
*/
|
||||||
iface = G_FILE_GET_IFACE (file);
|
iface = G_FILE_GET_IFACE (file);
|
||||||
return (* iface->set_attributes_finish) (file, result, info, error);
|
return (* iface->set_attributes_finish) (file, result, info, error);
|
||||||
}
|
}
|
||||||
@@ -2600,8 +2650,8 @@ g_file_set_attributes_finish (GFile *file,
|
|||||||
* @cancellable: optional #GCancellable object, %NULL to ignore.
|
* @cancellable: optional #GCancellable object, %NULL to ignore.
|
||||||
* @error: a #GError, or %NULL
|
* @error: a #GError, or %NULL
|
||||||
*
|
*
|
||||||
* Sets @attribute of type %G_FILE_ATTRIBUTE_TYPE_STRING to @value. If
|
* Sets @attribute of type %G_FILE_ATTRIBUTE_TYPE_STRING to @value.
|
||||||
* @attribute is of a different type, this operation will fail.
|
* If @attribute is of a different type, this operation will fail.
|
||||||
*
|
*
|
||||||
* If @cancellable is not %NULL, then the operation can be cancelled by
|
* If @cancellable is not %NULL, then the operation can be cancelled by
|
||||||
* triggering the cancellable object from another thread. If the operation
|
* triggering the cancellable object from another thread. If the operation
|
||||||
@@ -2633,8 +2683,9 @@ g_file_set_attribute_string (GFile *file,
|
|||||||
* @cancellable: optional #GCancellable object, %NULL to ignore.
|
* @cancellable: optional #GCancellable object, %NULL to ignore.
|
||||||
* @error: a #GError, or %NULL
|
* @error: a #GError, or %NULL
|
||||||
*
|
*
|
||||||
* Sets @attribute of type %G_FILE_ATTRIBUTE_TYPE_BYTE_STRING to @value. If
|
* Sets @attribute of type %G_FILE_ATTRIBUTE_TYPE_BYTE_STRING to @value.
|
||||||
* @attribute is of a different type, this operation will fail, returning %FALSE.
|
* If @attribute is of a different type, this operation will fail,
|
||||||
|
* returning %FALSE.
|
||||||
*
|
*
|
||||||
* If @cancellable is not %NULL, then the operation can be cancelled by
|
* If @cancellable is not %NULL, then the operation can be cancelled by
|
||||||
* triggering the cancellable object from another thread. If the operation
|
* triggering the cancellable object from another thread. If the operation
|
||||||
@@ -2667,8 +2718,8 @@ g_file_set_attribute_byte_string (GFile *file,
|
|||||||
* @cancellable: optional #GCancellable object, %NULL to ignore.
|
* @cancellable: optional #GCancellable object, %NULL to ignore.
|
||||||
* @error: a #GError, or %NULL
|
* @error: a #GError, or %NULL
|
||||||
*
|
*
|
||||||
* Sets @attribute of type %G_FILE_ATTRIBUTE_TYPE_UINT32 to @value. If
|
* Sets @attribute of type %G_FILE_ATTRIBUTE_TYPE_UINT32 to @value.
|
||||||
* @attribute is of a different type, this operation will fail.
|
* If @attribute is of a different type, this operation will fail.
|
||||||
*
|
*
|
||||||
* If @cancellable is not %NULL, then the operation can be cancelled by
|
* If @cancellable is not %NULL, then the operation can be cancelled by
|
||||||
* triggering the cancellable object from another thread. If the operation
|
* triggering the cancellable object from another thread. If the operation
|
||||||
@@ -2701,8 +2752,8 @@ g_file_set_attribute_uint32 (GFile *file,
|
|||||||
* @cancellable: optional #GCancellable object, %NULL to ignore.
|
* @cancellable: optional #GCancellable object, %NULL to ignore.
|
||||||
* @error: a #GError, or %NULL
|
* @error: a #GError, or %NULL
|
||||||
*
|
*
|
||||||
* Sets @attribute of type %G_FILE_ATTRIBUTE_TYPE_INT32 to @value. If
|
* Sets @attribute of type %G_FILE_ATTRIBUTE_TYPE_INT32 to @value.
|
||||||
* @attribute is of a different type, this operation will fail.
|
* If @attribute is of a different type, this operation will fail.
|
||||||
*
|
*
|
||||||
* If @cancellable is not %NULL, then the operation can be cancelled by
|
* If @cancellable is not %NULL, then the operation can be cancelled by
|
||||||
* triggering the cancellable object from another thread. If the operation
|
* triggering the cancellable object from another thread. If the operation
|
||||||
@@ -2735,8 +2786,8 @@ g_file_set_attribute_int32 (GFile *file,
|
|||||||
* @cancellable: optional #GCancellable object, %NULL to ignore.
|
* @cancellable: optional #GCancellable object, %NULL to ignore.
|
||||||
* @error: a #GError, or %NULL
|
* @error: a #GError, or %NULL
|
||||||
*
|
*
|
||||||
* Sets @attribute of type %G_FILE_ATTRIBUTE_TYPE_UINT64 to @value. If
|
* Sets @attribute of type %G_FILE_ATTRIBUTE_TYPE_UINT64 to @value.
|
||||||
* @attribute is of a different type, this operation will fail.
|
* If @attribute is of a different type, this operation will fail.
|
||||||
*
|
*
|
||||||
* If @cancellable is not %NULL, then the operation can be cancelled by
|
* If @cancellable is not %NULL, then the operation can be cancelled by
|
||||||
* triggering the cancellable object from another thread. If the operation
|
* triggering the cancellable object from another thread. If the operation
|
||||||
@@ -2769,8 +2820,8 @@ g_file_set_attribute_uint64 (GFile *file,
|
|||||||
* @cancellable: optional #GCancellable object, %NULL to ignore.
|
* @cancellable: optional #GCancellable object, %NULL to ignore.
|
||||||
* @error: a #GError, or %NULL
|
* @error: a #GError, or %NULL
|
||||||
*
|
*
|
||||||
* Sets @attribute of type %G_FILE_ATTRIBUTE_TYPE_INT64 to @value. If
|
* Sets @attribute of type %G_FILE_ATTRIBUTE_TYPE_INT64 to @value.
|
||||||
* @attribute is of a different type, this operation will fail.
|
* If @attribute is of a different type, this operation will fail.
|
||||||
*
|
*
|
||||||
* If @cancellable is not %NULL, then the operation can be cancelled by
|
* If @cancellable is not %NULL, then the operation can be cancelled by
|
||||||
* triggering the cancellable object from another thread. If the operation
|
* triggering the cancellable object from another thread. If the operation
|
||||||
@@ -2801,11 +2852,11 @@ g_file_set_attribute_int64 (GFile *file,
|
|||||||
* @callback: a #GAsyncReadyCallback.
|
* @callback: a #GAsyncReadyCallback.
|
||||||
* @user_data: a #gpointer.
|
* @user_data: a #gpointer.
|
||||||
*
|
*
|
||||||
|
* Mounts a mountable file using @mount_operation, if possible.
|
||||||
|
*
|
||||||
* If @cancellable is not %NULL, then the operation can be cancelled by
|
* If @cancellable is not %NULL, then the operation can be cancelled by
|
||||||
* triggering the cancellable object from another thread. If the operation
|
* triggering the cancellable object from another thread. If the operation
|
||||||
* was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
|
* was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
|
||||||
*
|
|
||||||
* Mounts a mountable file using @mount_operation, if possible.
|
|
||||||
**/
|
**/
|
||||||
void
|
void
|
||||||
g_file_mount_mountable (GFile *file,
|
g_file_mount_mountable (GFile *file,
|
||||||
@@ -2822,21 +2873,18 @@ g_file_mount_mountable (GFile *file,
|
|||||||
iface = G_FILE_GET_IFACE (file);
|
iface = G_FILE_GET_IFACE (file);
|
||||||
|
|
||||||
if (iface->mount_mountable == NULL)
|
if (iface->mount_mountable == NULL)
|
||||||
{
|
|
||||||
g_simple_async_report_error_in_idle (G_OBJECT (file),
|
g_simple_async_report_error_in_idle (G_OBJECT (file),
|
||||||
callback,
|
callback,
|
||||||
user_data,
|
user_data,
|
||||||
G_IO_ERROR,
|
G_IO_ERROR,
|
||||||
G_IO_ERROR_NOT_SUPPORTED,
|
G_IO_ERROR_NOT_SUPPORTED,
|
||||||
_("Operation not supported"));
|
_("Operation not supported"));
|
||||||
}
|
|
||||||
|
|
||||||
(* iface->mount_mountable) (file,
|
(* iface->mount_mountable) (file,
|
||||||
mount_operation,
|
mount_operation,
|
||||||
cancellable,
|
cancellable,
|
||||||
callback,
|
callback,
|
||||||
user_data);
|
user_data);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -2845,6 +2893,9 @@ g_file_mount_mountable (GFile *file,
|
|||||||
* @result: a #GAsyncResult.
|
* @result: a #GAsyncResult.
|
||||||
* @error: a #GError, or %NULL
|
* @error: a #GError, or %NULL
|
||||||
*
|
*
|
||||||
|
* Finish an asynchronous mount operation that was started
|
||||||
|
* with g_file_mount_mountable().
|
||||||
|
*
|
||||||
* Returns: a #GFile or %NULL on error.
|
* Returns: a #GFile or %NULL on error.
|
||||||
**/
|
**/
|
||||||
GFile *
|
GFile *
|
||||||
@@ -2875,6 +2926,8 @@ g_file_mount_mountable_finish (GFile *file,
|
|||||||
* @callback: a #GAsyncReadyCallback.
|
* @callback: a #GAsyncReadyCallback.
|
||||||
* @user_data: a #gpointer.
|
* @user_data: a #gpointer.
|
||||||
*
|
*
|
||||||
|
* Unmounts a mounted file.
|
||||||
|
*
|
||||||
* If @cancellable is not %NULL, then the operation can be cancelled by
|
* If @cancellable is not %NULL, then the operation can be cancelled by
|
||||||
* triggering the cancellable object from another thread. If the operation
|
* triggering the cancellable object from another thread. If the operation
|
||||||
* was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
|
* was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
|
||||||
@@ -2892,14 +2945,12 @@ g_file_unmount_mountable (GFile *file,
|
|||||||
iface = G_FILE_GET_IFACE (file);
|
iface = G_FILE_GET_IFACE (file);
|
||||||
|
|
||||||
if (iface->unmount_mountable == NULL)
|
if (iface->unmount_mountable == NULL)
|
||||||
{
|
|
||||||
g_simple_async_report_error_in_idle (G_OBJECT (file),
|
g_simple_async_report_error_in_idle (G_OBJECT (file),
|
||||||
callback,
|
callback,
|
||||||
user_data,
|
user_data,
|
||||||
G_IO_ERROR,
|
G_IO_ERROR,
|
||||||
G_IO_ERROR_NOT_SUPPORTED,
|
G_IO_ERROR_NOT_SUPPORTED,
|
||||||
_("Operation not supported"));
|
_("Operation not supported"));
|
||||||
}
|
|
||||||
|
|
||||||
(* iface->unmount_mountable) (file,
|
(* iface->unmount_mountable) (file,
|
||||||
cancellable,
|
cancellable,
|
||||||
@@ -2913,6 +2964,9 @@ g_file_unmount_mountable (GFile *file,
|
|||||||
* @result: a #GAsyncResult.
|
* @result: a #GAsyncResult.
|
||||||
* @error: a #GError, or %NULL
|
* @error: a #GError, or %NULL
|
||||||
*
|
*
|
||||||
|
* Finish an asynchronous unmount operation that was started
|
||||||
|
* with g_file_unmount_mountable().
|
||||||
|
*
|
||||||
* Returns: %TRUE if the operation finished successfully. %FALSE
|
* Returns: %TRUE if the operation finished successfully. %FALSE
|
||||||
* otherwise.
|
* otherwise.
|
||||||
**/
|
**/
|
||||||
@@ -2966,14 +3020,12 @@ g_file_eject_mountable (GFile *file,
|
|||||||
iface = G_FILE_GET_IFACE (file);
|
iface = G_FILE_GET_IFACE (file);
|
||||||
|
|
||||||
if (iface->eject_mountable == NULL)
|
if (iface->eject_mountable == NULL)
|
||||||
{
|
|
||||||
g_simple_async_report_error_in_idle (G_OBJECT (file),
|
g_simple_async_report_error_in_idle (G_OBJECT (file),
|
||||||
callback,
|
callback,
|
||||||
user_data,
|
user_data,
|
||||||
G_IO_ERROR,
|
G_IO_ERROR,
|
||||||
G_IO_ERROR_NOT_SUPPORTED,
|
G_IO_ERROR_NOT_SUPPORTED,
|
||||||
_("Operation not supported"));
|
_("Operation not supported"));
|
||||||
}
|
|
||||||
|
|
||||||
(* iface->eject_mountable) (file,
|
(* iface->eject_mountable) (file,
|
||||||
cancellable,
|
cancellable,
|
||||||
@@ -3020,6 +3072,8 @@ g_file_eject_mountable_finish (GFile *file,
|
|||||||
* @flags: a set of #GFileMonitorFlags.
|
* @flags: a set of #GFileMonitorFlags.
|
||||||
* @cancellable: optional #GCancellable object, %NULL to ignore.
|
* @cancellable: optional #GCancellable object, %NULL to ignore.
|
||||||
*
|
*
|
||||||
|
* Obtains a directory monitor for the given file.
|
||||||
|
*
|
||||||
* If @cancellable is not %NULL, then the operation can be cancelled by
|
* If @cancellable is not %NULL, then the operation can be cancelled by
|
||||||
* triggering the cancellable object from another thread. If the operation
|
* triggering the cancellable object from another thread. If the operation
|
||||||
* was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
|
* was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
|
||||||
@@ -3050,6 +3104,8 @@ g_file_monitor_directory (GFile *file,
|
|||||||
* @flags: a set of #GFileMonitorFlags.
|
* @flags: a set of #GFileMonitorFlags.
|
||||||
* @cancellable: optional #GCancellable object, %NULL to ignore.
|
* @cancellable: optional #GCancellable object, %NULL to ignore.
|
||||||
*
|
*
|
||||||
|
* Obtains a file monitor for the given file.
|
||||||
|
*
|
||||||
* If @cancellable is not %NULL, then the operation can be cancelled by
|
* If @cancellable is not %NULL, then the operation can be cancelled by
|
||||||
* triggering the cancellable object from another thread. If the operation
|
* triggering the cancellable object from another thread. If the operation
|
||||||
* was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
|
* was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
|
||||||
@@ -3654,9 +3710,8 @@ g_file_real_set_attributes_finish (GFile *file,
|
|||||||
if (info)
|
if (info)
|
||||||
*info = g_object_ref (data->info);
|
*info = g_object_ref (data->info);
|
||||||
|
|
||||||
if (error != NULL && data->error) {
|
if (error != NULL && data->error)
|
||||||
*error = g_error_copy (data->error);
|
*error = g_error_copy (data->error);
|
||||||
}
|
|
||||||
|
|
||||||
return data->res;
|
return data->res;
|
||||||
}
|
}
|
||||||
@@ -3680,8 +3735,7 @@ g_file_new_for_path (const char *path)
|
|||||||
{
|
{
|
||||||
g_return_val_if_fail (path != NULL, NULL);
|
g_return_val_if_fail (path != NULL, NULL);
|
||||||
|
|
||||||
return g_vfs_get_file_for_path (g_vfs_get_default (),
|
return g_vfs_get_file_for_path (g_vfs_get_default (), path);
|
||||||
path);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -3700,8 +3754,7 @@ g_file_new_for_uri (const char *uri)
|
|||||||
{
|
{
|
||||||
g_return_val_if_fail (uri != NULL, NULL);
|
g_return_val_if_fail (uri != NULL, NULL);
|
||||||
|
|
||||||
return g_vfs_get_file_for_uri (g_vfs_get_default (),
|
return g_vfs_get_file_for_uri (g_vfs_get_default (), uri);
|
||||||
uri);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -3720,8 +3773,7 @@ g_file_parse_name (const char *parse_name)
|
|||||||
{
|
{
|
||||||
g_return_val_if_fail (parse_name != NULL, NULL);
|
g_return_val_if_fail (parse_name != NULL, NULL);
|
||||||
|
|
||||||
return g_vfs_parse_name (g_vfs_get_default (),
|
return g_vfs_parse_name (g_vfs_get_default (), parse_name);
|
||||||
parse_name);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
@@ -3901,9 +3953,7 @@ g_file_load_contents (GFile *file,
|
|||||||
g_return_val_if_fail (G_IS_FILE (file), FALSE);
|
g_return_val_if_fail (G_IS_FILE (file), FALSE);
|
||||||
g_return_val_if_fail (contents != NULL, FALSE);
|
g_return_val_if_fail (contents != NULL, FALSE);
|
||||||
|
|
||||||
in = g_file_read (file,
|
in = g_file_read (file, cancellable, error);
|
||||||
cancellable,
|
|
||||||
error);
|
|
||||||
if (in == NULL)
|
if (in == NULL)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
@@ -4172,6 +4222,9 @@ g_file_load_partial_contents_async (GFile *file,
|
|||||||
* @etag_out: a location to place the current entity tag for the file.
|
* @etag_out: a location to place the current entity tag for the file.
|
||||||
* @error: a #GError, or %NULL
|
* @error: a #GError, or %NULL
|
||||||
*
|
*
|
||||||
|
* Finishes an asynchronous partial load operation that was started
|
||||||
|
* with g_file_load_partial_contents_async().
|
||||||
|
*
|
||||||
* Returns: %TRUE if the load was successful. If %FALSE and @error is
|
* Returns: %TRUE if the load was successful. If %FALSE and @error is
|
||||||
* present, it will be set appropriately.
|
* present, it will be set appropriately.
|
||||||
**/
|
**/
|
||||||
@@ -4219,8 +4272,7 @@ g_file_load_partial_contents_finish (GFile *file,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Zero terminate */
|
/* Zero terminate */
|
||||||
g_byte_array_set_size (data->content,
|
g_byte_array_set_size (data->content, data->pos + 1);
|
||||||
data->pos + 1);
|
|
||||||
data->content->data[data->pos] = 0;
|
data->content->data[data->pos] = 0;
|
||||||
|
|
||||||
*contents = (char *)g_byte_array_free (data->content, FALSE);
|
*contents = (char *)g_byte_array_free (data->content, FALSE);
|
||||||
@@ -4236,10 +4288,11 @@ g_file_load_partial_contents_finish (GFile *file,
|
|||||||
* @callback: a #GAsyncReadyCallback.
|
* @callback: a #GAsyncReadyCallback.
|
||||||
* @user_data: a #gpointer.
|
* @user_data: a #gpointer.
|
||||||
*
|
*
|
||||||
* Starts an asynchronous load of the @file's contents. When the load operation
|
* Starts an asynchronous load of the @file's contents.
|
||||||
* has completed, @callback will be called with @userdata. To finish
|
* When the load operation has completed, @callback will be called
|
||||||
* the operation, call g_file_load_contents_finish() with the
|
* with @userdata. To finish the operation, call
|
||||||
* #GAsyncResult returned by the @callback.
|
* g_file_load_contents_finish() with the #GAsyncResult returned by
|
||||||
|
* the @callback.
|
||||||
*
|
*
|
||||||
* If @cancellable is not %NULL, then the operation can be cancelled by
|
* If @cancellable is not %NULL, then the operation can be cancelled by
|
||||||
* triggering the cancellable object from another thread. If the operation
|
* triggering the cancellable object from another thread. If the operation
|
||||||
@@ -4255,7 +4308,6 @@ g_file_load_contents_async (GFile *file,
|
|||||||
cancellable,
|
cancellable,
|
||||||
NULL,
|
NULL,
|
||||||
callback, user_data);
|
callback, user_data);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -4267,10 +4319,10 @@ g_file_load_contents_async (GFile *file,
|
|||||||
* @etag_out: a location to place the current entity tag for the file.
|
* @etag_out: a location to place the current entity tag for the file.
|
||||||
* @error: a #GError, or %NULL
|
* @error: a #GError, or %NULL
|
||||||
*
|
*
|
||||||
* Finishes an asynchronous load of the @file's contents. The contents
|
* Finishes an asynchronous load of the @file's contents.
|
||||||
* are placed in @contents, and @length is set to the size of the @contents
|
* The contents are placed in @contents, and @length is set to the
|
||||||
* string. If @etag_out is present, it will be set to the new entity
|
* size of the @contents string. If @etag_out is present, it will be
|
||||||
* tag for the @file.
|
* set to the new entity tag for the @file.
|
||||||
*
|
*
|
||||||
* Returns: %TRUE if the load was successful. If %FALSE and @error is
|
* Returns: %TRUE if the load was successful. If %FALSE and @error is
|
||||||
* present, it will be set appropriately.
|
* present, it will be set appropriately.
|
||||||
@@ -4289,7 +4341,6 @@ g_file_load_contents_finish (GFile *file,
|
|||||||
length,
|
length,
|
||||||
etag_out,
|
etag_out,
|
||||||
error);
|
error);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -4304,9 +4355,9 @@ g_file_load_contents_finish (GFile *file,
|
|||||||
* @cancellable: optional #GCancellable object, %NULL to ignore.
|
* @cancellable: optional #GCancellable object, %NULL to ignore.
|
||||||
* @error: a #GError, or %NULL
|
* @error: a #GError, or %NULL
|
||||||
*
|
*
|
||||||
* Replaces the contents of @file with @contents of @length bytes. The old
|
* Replaces the contents of @file with @contents of @length bytes.
|
||||||
* @etag will be replaced with the @new_etag. If @make_backup is %TRUE,
|
* The old @etag will be replaced with the @new_etag. If @make_backup
|
||||||
* this function will attempt to make a backup of @file.
|
* is %TRUE, this function will attempt to make a backup of @file.
|
||||||
*
|
*
|
||||||
* If @cancellable is not %NULL, then the operation can be cancelled by
|
* If @cancellable is not %NULL, then the operation can be cancelled by
|
||||||
* triggering the cancellable object from another thread. If the operation
|
* triggering the cancellable object from another thread. If the operation
|
||||||
|
@@ -362,7 +362,7 @@ close_async_callback_wrapper (GObject *source_object,
|
|||||||
/**
|
/**
|
||||||
* g_file_enumerator_close_async:
|
* g_file_enumerator_close_async:
|
||||||
* @enumerator: a #GFileEnumerator.
|
* @enumerator: a #GFileEnumerator.
|
||||||
* @io_priority: the io priority of the request. the io priority of the request
|
* @io_priority: the io priority of the request.
|
||||||
* @cancellable: optional #GCancellable object, %NULL to ignore.
|
* @cancellable: optional #GCancellable object, %NULL to ignore.
|
||||||
* @callback: callback to call when the request is satisfied
|
* @callback: callback to call when the request is satisfied
|
||||||
* @user_data: the user_data to pass to callback function
|
* @user_data: the user_data to pass to callback function
|
||||||
|
@@ -257,7 +257,8 @@ g_file_info_new (void)
|
|||||||
* Copies all of the #GFileAttribute<!-- -->s from @src_info to @dest_info.
|
* Copies all of the #GFileAttribute<!-- -->s from @src_info to @dest_info.
|
||||||
**/
|
**/
|
||||||
void
|
void
|
||||||
g_file_info_copy_into (GFileInfo *src_info, GFileInfo *dest_info)
|
g_file_info_copy_into (GFileInfo *src_info,
|
||||||
|
GFileInfo *dest_info)
|
||||||
{
|
{
|
||||||
GFileAttribute *source, *dest;
|
GFileAttribute *source, *dest;
|
||||||
int i;
|
int i;
|
||||||
@@ -680,7 +681,7 @@ g_file_info_get_attribute_boolean (GFileInfo *info,
|
|||||||
*
|
*
|
||||||
* Gets an unsigned 32-bit integer contained within the attribute. If the
|
* Gets an unsigned 32-bit integer contained within the attribute. If the
|
||||||
* attribute does not contain an unsigned 32-bit integer, or is invalid,
|
* attribute does not contain an unsigned 32-bit integer, or is invalid,
|
||||||
* %0 will be returned.
|
* 0 will be returned.
|
||||||
*
|
*
|
||||||
* Returns: an unsigned 32-bit integer from the attribute.
|
* Returns: an unsigned 32-bit integer from the attribute.
|
||||||
**/
|
**/
|
||||||
@@ -704,7 +705,7 @@ g_file_info_get_attribute_uint32 (GFileInfo *info,
|
|||||||
*
|
*
|
||||||
* Gets a signed 32-bit integer contained within the attribute. If the
|
* Gets a signed 32-bit integer contained within the attribute. If the
|
||||||
* attribute does not contain a signed 32-bit integer, or is invalid,
|
* attribute does not contain a signed 32-bit integer, or is invalid,
|
||||||
* %0 will be returned.
|
* 0 will be returned.
|
||||||
*
|
*
|
||||||
* Returns: a signed 32-bit integer from the attribute.
|
* Returns: a signed 32-bit integer from the attribute.
|
||||||
**/
|
**/
|
||||||
@@ -728,7 +729,7 @@ g_file_info_get_attribute_int32 (GFileInfo *info,
|
|||||||
*
|
*
|
||||||
* Gets a unsigned 64-bit integer contained within the attribute. If the
|
* Gets a unsigned 64-bit integer contained within the attribute. If the
|
||||||
* attribute does not contain an unsigned 64-bit integer, or is invalid,
|
* attribute does not contain an unsigned 64-bit integer, or is invalid,
|
||||||
* %0 will be returned.
|
* 0 will be returned.
|
||||||
*
|
*
|
||||||
* Returns: a unsigned 64-bit integer from the attribute.
|
* Returns: a unsigned 64-bit integer from the attribute.
|
||||||
**/
|
**/
|
||||||
@@ -752,7 +753,7 @@ g_file_info_get_attribute_uint64 (GFileInfo *info,
|
|||||||
*
|
*
|
||||||
* Gets a signed 64-bit integer contained within the attribute. If the
|
* Gets a signed 64-bit integer contained within the attribute. If the
|
||||||
* attribute does not contain an signed 64-bit integer, or is invalid,
|
* attribute does not contain an signed 64-bit integer, or is invalid,
|
||||||
* %0 will be returned.
|
* 0 will be returned.
|
||||||
*
|
*
|
||||||
* Returns: a signed 64-bit integer from the attribute.
|
* Returns: a signed 64-bit integer from the attribute.
|
||||||
**/
|
**/
|
||||||
@@ -817,7 +818,6 @@ g_file_info_create_value_by_name (GFileInfo *info,
|
|||||||
*
|
*
|
||||||
* Sets the @attribute to contain the given @attr_value,
|
* Sets the @attribute to contain the given @attr_value,
|
||||||
* if possible.
|
* if possible.
|
||||||
*
|
|
||||||
**/
|
**/
|
||||||
void
|
void
|
||||||
g_file_info_set_attribute (GFileInfo *info,
|
g_file_info_set_attribute (GFileInfo *info,
|
||||||
@@ -843,7 +843,6 @@ g_file_info_set_attribute (GFileInfo *info,
|
|||||||
*
|
*
|
||||||
* Sets the @attribute to contain the given @attr_value,
|
* Sets the @attribute to contain the given @attr_value,
|
||||||
* if possible.
|
* if possible.
|
||||||
*
|
|
||||||
**/
|
**/
|
||||||
void
|
void
|
||||||
g_file_info_set_attribute_object (GFileInfo *info,
|
g_file_info_set_attribute_object (GFileInfo *info,
|
||||||
@@ -869,7 +868,6 @@ g_file_info_set_attribute_object (GFileInfo *info,
|
|||||||
*
|
*
|
||||||
* Sets the @attribute to contain the given @attr_value,
|
* Sets the @attribute to contain the given @attr_value,
|
||||||
* if possible.
|
* if possible.
|
||||||
*
|
|
||||||
**/
|
**/
|
||||||
void
|
void
|
||||||
g_file_info_set_attribute_string (GFileInfo *info,
|
g_file_info_set_attribute_string (GFileInfo *info,
|
||||||
@@ -895,7 +893,6 @@ g_file_info_set_attribute_string (GFileInfo *info,
|
|||||||
*
|
*
|
||||||
* Sets the @attribute to contain the given @attr_value,
|
* Sets the @attribute to contain the given @attr_value,
|
||||||
* if possible.
|
* if possible.
|
||||||
*
|
|
||||||
**/
|
**/
|
||||||
void
|
void
|
||||||
g_file_info_set_attribute_byte_string (GFileInfo *info,
|
g_file_info_set_attribute_byte_string (GFileInfo *info,
|
||||||
@@ -921,7 +918,6 @@ g_file_info_set_attribute_byte_string (GFileInfo *info,
|
|||||||
*
|
*
|
||||||
* Sets the @attribute to contain the given @attr_value,
|
* Sets the @attribute to contain the given @attr_value,
|
||||||
* if possible.
|
* if possible.
|
||||||
*
|
|
||||||
**/
|
**/
|
||||||
void
|
void
|
||||||
g_file_info_set_attribute_boolean (GFileInfo *info,
|
g_file_info_set_attribute_boolean (GFileInfo *info,
|
||||||
@@ -946,9 +942,7 @@ g_file_info_set_attribute_boolean (GFileInfo *info,
|
|||||||
*
|
*
|
||||||
* Sets the @attribute to contain the given @attr_value,
|
* Sets the @attribute to contain the given @attr_value,
|
||||||
* if possible.
|
* if possible.
|
||||||
*
|
|
||||||
**/
|
**/
|
||||||
|
|
||||||
void
|
void
|
||||||
g_file_info_set_attribute_uint32 (GFileInfo *info,
|
g_file_info_set_attribute_uint32 (GFileInfo *info,
|
||||||
const char *attribute,
|
const char *attribute,
|
||||||
@@ -973,7 +967,6 @@ g_file_info_set_attribute_uint32 (GFileInfo *info,
|
|||||||
*
|
*
|
||||||
* Sets the @attribute to contain the given @attr_value,
|
* Sets the @attribute to contain the given @attr_value,
|
||||||
* if possible.
|
* if possible.
|
||||||
*
|
|
||||||
**/
|
**/
|
||||||
void
|
void
|
||||||
g_file_info_set_attribute_int32 (GFileInfo *info,
|
g_file_info_set_attribute_int32 (GFileInfo *info,
|
||||||
@@ -998,7 +991,6 @@ g_file_info_set_attribute_int32 (GFileInfo *info,
|
|||||||
*
|
*
|
||||||
* Sets the @attribute to contain the given @attr_value,
|
* Sets the @attribute to contain the given @attr_value,
|
||||||
* if possible.
|
* if possible.
|
||||||
*
|
|
||||||
**/
|
**/
|
||||||
void
|
void
|
||||||
g_file_info_set_attribute_uint64 (GFileInfo *info,
|
g_file_info_set_attribute_uint64 (GFileInfo *info,
|
||||||
@@ -1283,9 +1275,7 @@ g_file_info_get_size (GFileInfo *info)
|
|||||||
*
|
*
|
||||||
* Gets the modification time of the current @info and sets it
|
* Gets the modification time of the current @info and sets it
|
||||||
* in @result.
|
* in @result.
|
||||||
*
|
|
||||||
**/
|
**/
|
||||||
|
|
||||||
void
|
void
|
||||||
g_file_info_get_modification_time (GFileInfo *info,
|
g_file_info_get_modification_time (GFileInfo *info,
|
||||||
GTimeVal *result)
|
GTimeVal *result)
|
||||||
@@ -1437,7 +1427,6 @@ g_file_info_set_is_hidden (GFileInfo *info,
|
|||||||
*
|
*
|
||||||
* Sets the "is_symlink" attribute in a #GFileInfo according to @is_symlink.
|
* Sets the "is_symlink" attribute in a #GFileInfo according to @is_symlink.
|
||||||
* See %G_FILE_ATTRIBUTE_STD_IS_SYMLINK.
|
* See %G_FILE_ATTRIBUTE_STD_IS_SYMLINK.
|
||||||
*
|
|
||||||
**/
|
**/
|
||||||
void
|
void
|
||||||
g_file_info_set_is_symlink (GFileInfo *info,
|
g_file_info_set_is_symlink (GFileInfo *info,
|
||||||
@@ -1463,7 +1452,6 @@ g_file_info_set_is_symlink (GFileInfo *info,
|
|||||||
*
|
*
|
||||||
* Sets the name attribute for the current #GFileInfo.
|
* Sets the name attribute for the current #GFileInfo.
|
||||||
* See %G_FILE_ATTRIBUTE_STD_NAME.
|
* See %G_FILE_ATTRIBUTE_STD_NAME.
|
||||||
*
|
|
||||||
**/
|
**/
|
||||||
void
|
void
|
||||||
g_file_info_set_name (GFileInfo *info,
|
g_file_info_set_name (GFileInfo *info,
|
||||||
@@ -1490,7 +1478,6 @@ g_file_info_set_name (GFileInfo *info,
|
|||||||
*
|
*
|
||||||
* Sets the display name for the current #GFileInfo.
|
* Sets the display name for the current #GFileInfo.
|
||||||
* See %G_FILE_ATTRIBUTE_STD_DISPLAY_NAME.
|
* See %G_FILE_ATTRIBUTE_STD_DISPLAY_NAME.
|
||||||
*
|
|
||||||
**/
|
**/
|
||||||
void
|
void
|
||||||
g_file_info_set_display_name (GFileInfo *info,
|
g_file_info_set_display_name (GFileInfo *info,
|
||||||
@@ -1517,9 +1504,7 @@ g_file_info_set_display_name (GFileInfo *info,
|
|||||||
*
|
*
|
||||||
* Sets the edit name for the current file.
|
* Sets the edit name for the current file.
|
||||||
* See %G_FILE_ATTRIBUTE_STD_EDIT_NAME.
|
* See %G_FILE_ATTRIBUTE_STD_EDIT_NAME.
|
||||||
*
|
|
||||||
**/
|
**/
|
||||||
|
|
||||||
void
|
void
|
||||||
g_file_info_set_edit_name (GFileInfo *info,
|
g_file_info_set_edit_name (GFileInfo *info,
|
||||||
const char *edit_name)
|
const char *edit_name)
|
||||||
@@ -1545,7 +1530,6 @@ g_file_info_set_edit_name (GFileInfo *info,
|
|||||||
*
|
*
|
||||||
* Sets the icon for a given #GFileInfo.
|
* Sets the icon for a given #GFileInfo.
|
||||||
* See %G_FILE_ATTRIBUTE_STD_ICON.
|
* See %G_FILE_ATTRIBUTE_STD_ICON.
|
||||||
*
|
|
||||||
**/
|
**/
|
||||||
void
|
void
|
||||||
g_file_info_set_icon (GFileInfo *info,
|
g_file_info_set_icon (GFileInfo *info,
|
||||||
@@ -1572,7 +1556,6 @@ g_file_info_set_icon (GFileInfo *info,
|
|||||||
*
|
*
|
||||||
* Sets the content type attribute for a given #GFileInfo.
|
* Sets the content type attribute for a given #GFileInfo.
|
||||||
* See %G_FILE_ATTRIBUTE_STD_CONTENT_TYPE.
|
* See %G_FILE_ATTRIBUTE_STD_CONTENT_TYPE.
|
||||||
*
|
|
||||||
**/
|
**/
|
||||||
void
|
void
|
||||||
g_file_info_set_content_type (GFileInfo *info,
|
g_file_info_set_content_type (GFileInfo *info,
|
||||||
@@ -1599,7 +1582,6 @@ g_file_info_set_content_type (GFileInfo *info,
|
|||||||
*
|
*
|
||||||
* Sets the %G_FILE_ATTRIBUTE_STD_SIZE attribute in the file info
|
* Sets the %G_FILE_ATTRIBUTE_STD_SIZE attribute in the file info
|
||||||
* to the given size.
|
* to the given size.
|
||||||
*
|
|
||||||
**/
|
**/
|
||||||
void
|
void
|
||||||
g_file_info_set_size (GFileInfo *info,
|
g_file_info_set_size (GFileInfo *info,
|
||||||
@@ -1625,7 +1607,6 @@ g_file_info_set_size (GFileInfo *info,
|
|||||||
*
|
*
|
||||||
* Sets the %G_FILE_ATTRIBUTE_TIME_MODIFIED attribute in the file
|
* Sets the %G_FILE_ATTRIBUTE_TIME_MODIFIED attribute in the file
|
||||||
* info to the given time value.
|
* info to the given time value.
|
||||||
*
|
|
||||||
**/
|
**/
|
||||||
void
|
void
|
||||||
g_file_info_set_modification_time (GFileInfo *info,
|
g_file_info_set_modification_time (GFileInfo *info,
|
||||||
@@ -1658,7 +1639,6 @@ g_file_info_set_modification_time (GFileInfo *info,
|
|||||||
*
|
*
|
||||||
* Sets the %G_FILE_ATTRIBUTE_STD_SYMLINK_TARGET attribute in the file info
|
* Sets the %G_FILE_ATTRIBUTE_STD_SYMLINK_TARGET attribute in the file info
|
||||||
* to the given symlink target.
|
* to the given symlink target.
|
||||||
*
|
|
||||||
**/
|
**/
|
||||||
void
|
void
|
||||||
g_file_info_set_symlink_target (GFileInfo *info,
|
g_file_info_set_symlink_target (GFileInfo *info,
|
||||||
@@ -1685,7 +1665,6 @@ g_file_info_set_symlink_target (GFileInfo *info,
|
|||||||
*
|
*
|
||||||
* Sets the sort order attribute in the file info structure. See
|
* Sets the sort order attribute in the file info structure. See
|
||||||
* %G_FILE_ATTRIBUTE_STD_SORT_ORDER.
|
* %G_FILE_ATTRIBUTE_STD_SORT_ORDER.
|
||||||
*
|
|
||||||
**/
|
**/
|
||||||
void
|
void
|
||||||
g_file_info_set_sort_order (GFileInfo *info,
|
g_file_info_set_sort_order (GFileInfo *info,
|
||||||
@@ -1725,7 +1704,8 @@ struct _GFileAttributeMatcher {
|
|||||||
|
|
||||||
static void
|
static void
|
||||||
matcher_add (GFileAttributeMatcher *matcher,
|
matcher_add (GFileAttributeMatcher *matcher,
|
||||||
guint id, guint mask)
|
guint id,
|
||||||
|
guint mask)
|
||||||
{
|
{
|
||||||
SubMatcher *sub_matchers;
|
SubMatcher *sub_matchers;
|
||||||
int i;
|
int i;
|
||||||
|
@@ -106,11 +106,11 @@ g_file_input_stream_init (GFileInputStream *stream)
|
|||||||
* @error: a #GError location to store the error occuring, or %NULL to
|
* @error: a #GError location to store the error occuring, or %NULL to
|
||||||
* ignore.
|
* ignore.
|
||||||
*
|
*
|
||||||
* Queries a file input stream the given @attributes.his function blocks while querying
|
* Queries a file input stream the given @attributes.his function blocks
|
||||||
* the stream. For the asynchronous (non-blocking) version of this function, see
|
* while querying the stream. For the asynchronous (non-blocking) version
|
||||||
* g_file_input_stream_query_info_async(). While the stream is blocked,
|
* of this function, see g_file_input_stream_query_info_async(). While the
|
||||||
* the stream will set the pending flag internally, and any other operations on the
|
* stream is blocked, the stream will set the pending flag internally, and
|
||||||
* stream will fail with %G_IO_ERROR_PENDING.
|
* any other operations on the stream will fail with %G_IO_ERROR_PENDING.
|
||||||
*
|
*
|
||||||
* Returns: a #GFileInfo, or %NULL on error.
|
* Returns: a #GFileInfo, or %NULL on error.
|
||||||
**/
|
**/
|
||||||
@@ -186,8 +186,8 @@ async_ready_callback_wrapper (GObject *source_object,
|
|||||||
* @callback: callback to call when the request is satisfied
|
* @callback: callback to call when the request is satisfied
|
||||||
* @user_data: the data to pass to callback function
|
* @user_data: the data to pass to callback function
|
||||||
*
|
*
|
||||||
* Queries the stream information asynchronously. For the synchronous version
|
* Queries the stream information asynchronously. For the synchronous
|
||||||
* of this function, see g_file_input_stream_query_info().
|
* version of this function, see g_file_input_stream_query_info().
|
||||||
*
|
*
|
||||||
* If @cancellable is not %NULL, then the operation can be cancelled by
|
* If @cancellable is not %NULL, then the operation can be cancelled by
|
||||||
* triggering the cancellable object from another thread. If the operation
|
* triggering the cancellable object from another thread. If the operation
|
||||||
@@ -242,8 +242,8 @@ g_file_input_stream_query_info_async (GFileInputStream *stream,
|
|||||||
* g_file_input_stream_query_info_finish:
|
* g_file_input_stream_query_info_finish:
|
||||||
* @stream: a #GFileInputStream.
|
* @stream: a #GFileInputStream.
|
||||||
* @result: a #GAsyncResult.
|
* @result: a #GAsyncResult.
|
||||||
* @error: a #GError location to store the error occuring, or %NULL to
|
* @error: a #GError location to store the error occuring,
|
||||||
* ignore.
|
* or %NULL to ignore.
|
||||||
*
|
*
|
||||||
* Finishes an asynchronous info query operation.
|
* Finishes an asynchronous info query operation.
|
||||||
*
|
*
|
||||||
@@ -343,8 +343,8 @@ g_file_input_stream_seekable_can_seek (GSeekable *seekable)
|
|||||||
* @offset: a #goffset to seek.
|
* @offset: a #goffset to seek.
|
||||||
* @type: a #GSeekType.
|
* @type: a #GSeekType.
|
||||||
* @cancellable: optional #GCancellable object, %NULL to ignore.
|
* @cancellable: optional #GCancellable object, %NULL to ignore.
|
||||||
* @error: a #GError location to store the error occuring, or %NULL to
|
* @error: a #GError location to store the error occuring, or
|
||||||
* ignore.
|
* %NULL to ignore.
|
||||||
*
|
*
|
||||||
* Seeks in the file input stream.
|
* Seeks in the file input stream.
|
||||||
*
|
*
|
||||||
|
@@ -375,8 +375,6 @@ g_filter_input_stream_close_async (GInputStream *stream,
|
|||||||
cancellable,
|
cancellable,
|
||||||
callback,
|
callback,
|
||||||
user_data);
|
user_data);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
@@ -400,5 +398,3 @@ g_filter_input_stream_close_finish (GInputStream *stream,
|
|||||||
|
|
||||||
#define __G_FILTER_INPUT_STREAM_C__
|
#define __G_FILTER_INPUT_STREAM_C__
|
||||||
#include "gioaliasdef.c"
|
#include "gioaliasdef.c"
|
||||||
|
|
||||||
/* vim: ts=2 sw=2 et */
|
|
||||||
|
Reference in New Issue
Block a user