[ace-users] ACE_DIRENT question
Stew Paddaso
stew.paddaso at gmail.com
Tue Jul 31 17:00:36 CDT 2007
I need to generate a list of all the files in a directory. I'm looking
at the ACE_Dirent_Selector class... specifically the open command and
the ACE_DIRENT structure. I looked at the definition for ACE_DIRENT
in ace/os_include/os_dirent.h, and found the following structure:
struct dirent {
unsigned short d_ino;
unsigned short d_off;
unsigned short d_reclen;
// This must be a ACE_TCHAR * and not a one element
// ACE_TCHAR array. It causes problems on wide
// character builds with Visual C++ 6.0.
ACE_TCHAR *d_name;
};
followed by:
#define ACE_DIRENT dirent
This structure is only defined in builds where ACE_LACKS_STRUCT_DIR is
defined. Being unfamiliar with dirent structure on POSIX systems, I'm
wondering if the ACE_DIRENT structure members are guaranteed to be the
same across all platforms? Also, is there a class for extracting these
values in an OO manner, or is it standard practive to operate on the
structure? Thanks.
More information about the Ace-users
mailing list