summaryrefslogtreecommitdiff
path: root/gio/gfile.h
diff options
context:
space:
mode:
authorAlexander Larsson <alexl@redhat.com>2008-02-21 09:09:59 +0000
committerAlexander Larsson <alexl@src.gnome.org>2008-02-21 09:09:59 +0000
commit6dc9b7ee0050c03e069d026c2c83136547a7d343 (patch)
tree3a6dc53bc3b2e256758743bfc7b80add143647a9 /gio/gfile.h
parent03c51e95a7b6b4c53fe53bda761398a06d52d4af (diff)
downloadglib-6dc9b7ee0050c03e069d026c2c83136547a7d343.tar.gz
Add new g_file_has_prefix that does the same as g_file_contains_file.
2008-02-21 Alexander Larsson <alexl@redhat.com> * gfile.[ch]: * gio.symbols: Add new g_file_has_prefix that does the same as g_file_contains_file. Deprecate g_file_contains_file and add a macro that converts it to g_file_has_prefix. The reason for this change is that the contains_file() name seems to imply that this does more work than what it does, but its really only a name match (from #517086) * gdummyfile.c: * glocalfile.c: * tests/g-file.c: Update to match the above change. svn path=/trunk/; revision=6546
Diffstat (limited to 'gio/gfile.h')
-rw-r--r--gio/gfile.h13
1 files changed, 8 insertions, 5 deletions
diff --git a/gio/gfile.h b/gio/gfile.h
index 50dd0d0e5..e9e56aa6a 100644
--- a/gio/gfile.h
+++ b/gio/gfile.h
@@ -187,7 +187,7 @@ typedef gboolean (* GFileReadMoreCallback) (const char *file_contents,
* @get_uri: Gets a URI for the path within a #GFile.
* @get_parse_name: Gets the parsed name for the #GFile.
* @get_parent: Gets the parent directory for the #GFile.
- * @contains_file: Checks whether a #GFile contains a specified file.
+ * @prefix_matches: Checks whether a #GFile contains a specified file.
* @get_relative_path: Gets the path for a #GFile relative to a given path.
* @resolve_relative_path: Resolves a relative path for a #GFile to an absolute path.
* @get_child_for_display_name: Gets the child #GFile for a given display name.
@@ -278,8 +278,8 @@ struct _GFileIface
char * (*get_uri) (GFile *file);
char * (*get_parse_name) (GFile *file);
GFile * (*get_parent) (GFile *file);
- gboolean (*contains_file) (GFile *parent,
- GFile *descendant);
+ gboolean (*prefix_matches) (GFile *prefix,
+ GFile *file);
char * (*get_relative_path) (GFile *parent,
GFile *descendant);
GFile * (*resolve_relative_path) (GFile *file,
@@ -573,8 +573,11 @@ GFile * g_file_get_child (GFile
GFile * g_file_get_child_for_display_name (GFile *file,
const char *display_name,
GError **error);
-gboolean g_file_contains_file (GFile *parent,
- GFile *descendant);
+#ifndef G_DISABLE_DEPRECATED
+#define g_file_contains_file(_parent, _child) g_file_has_prefix (_child, _parent)
+#endif
+gboolean g_file_has_prefix (GFile *file,
+ GFile *prefix);
char * g_file_get_relative_path (GFile *parent,
GFile *descendant);
GFile * g_file_resolve_relative_path (GFile *file,