mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-09-06 16:08:43 +02:00
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
This commit is contained in:
committed by
Alexander Larsson
parent
03c51e95a7
commit
6dc9b7ee00
13
gio/gfile.h
13
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,
|
||||
|
Reference in New Issue
Block a user