[ace-users] ACE_DIRENT question

Steve Huston shuston at riverace.com
Tue Jul 31 19:23:50 CDT 2007


Hi Stew,

Have a look at ACE_wrappers/tests/Dirent_Test.cpp

-Steve

--
Steve Huston, Riverace Corporation
Would you like ACE to run great on your platform?
See http://www.riverace.com/sponsor.htm


> -----Original Message-----
> From: ace-users-bounces at cse.wustl.edu 
> [mailto:ace-users-bounces at cse.wustl.edu] On Behalf Of Stew Paddaso
> Sent: Tuesday, July 31, 2007 6:01 PM
> To: ace-users at cse.wustl.edu
> Subject: [ace-users] ACE_DIRENT question
> 
> 
> 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.
> 
> _______________________________________________
> ace-users mailing list
> ace-users at mail.cse.wustl.edu
> http://mail.cse.wustl.edu/mailman/listinfo/ace-users
> 




More information about the Ace-users mailing list