[glib: 1/2] gfileutils: Add examples to g_path_get_dirname() documentation



commit ec5d6ab63dc066df5522747ce59c6a06763f999c
Author: Philip Withnall <withnall endlessm com>
Date:   Tue Oct 23 14:38:13 2018 +1300

    gfileutils: Add examples to g_path_get_dirname() documentation
    
    See https://gitlab.gnome.org/GNOME/glib/merge_requests/326.
    
    Signed-off-by: Philip Withnall <withnall endlessm com>

 glib/gfileutils.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
---
diff --git a/glib/gfileutils.c b/glib/gfileutils.c
index 1e7a771a9..d6beaa5c0 100644
--- a/glib/gfileutils.c
+++ b/glib/gfileutils.c
@@ -2387,7 +2387,9 @@ g_path_get_basename (const gchar *file_name)
  * g_path_get_dirname:
  * @file_name: (type filename): the name of the file
  *
- * Gets the directory components of a file name.
+ * Gets the directory components of a file name. For example, the directory
+ * component of `/usr/bin/test` is `/usr/bin`. The directory component of `/`
+ * is `/`.
  *
  * If the file name has no directory components "." is returned.
  * The returned string should be freed when no longer needed.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]