GNOME Bugzilla – Bug 532501
add g_dir_read_name_stat()
Last modified: 2018-05-24 11:25:01 UTC
[ forwarded from http://bugs.debian.org/480497 by Florian Ragwitz ] Hi, glib currently provides g_dir_read_name for reading the contents of a directory. It's a quite common operation to first get a directory entry and stat() it directly afterwards. When using g_dir_read_name this currently requires you build the full path name to the directory entry using g_build_filename() (or something similar) and to call g_{,l}stat for getting the file information. This is not only unconvenient but also ineffective on platforms that provide fstatat().
Created attachment 110685 [details] [review] Proposed implementation Here is the proposed patch from Florian Ragwitz. It implements a g_dir_read_name_stat function that reads the name of the next directory entry from a GDir, just like g_dir_read_name does, and stats if afterwards. It uses fstatat() where available.
*** Bug 532562 has been marked as a duplicate of this bug. ***
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/glib/issues/139.