After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 532501 - add g_dir_read_name_stat()
add g_dir_read_name_stat()
Status: RESOLVED OBSOLETE
Product: glib
Classification: Platform
Component: general
2.16.x
Other Linux
: Normal enhancement
: ---
Assigned To: gtkdev
gtkdev
: 532562 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2008-05-10 17:29 UTC by Josselin Mouette
Modified: 2018-05-24 11:25 UTC
See Also:
GNOME target: ---
GNOME version: Unversioned Enhancement


Attachments
Proposed implementation (5.31 KB, patch)
2008-05-10 17:33 UTC, Josselin Mouette
none Details | Review

Description Josselin Mouette 2008-05-10 17:29:18 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().
Comment 1 Josselin Mouette 2008-05-10 17:33:12 UTC
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.
Comment 2 Matthias Clasen 2008-05-15 05:08:07 UTC
*** Bug 532562 has been marked as a duplicate of this bug. ***
Comment 3 GNOME Infrastructure Team 2018-05-24 11:25:01 UTC
-- 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.