By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,192 Members | 1,253 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,192 IT Pros & Developers. It's quick & easy.

files and subdirectories

P: n/a
I'm looking for libraries to handle basic operations on files and
subdirectories as listing the files and the subdirectories of a
directory.

Someone suggest me <dirent.h(which is supported by g++) but I
couldn't find clear information about its usage.

Does anyone knows a more documented alternative? Or a good reference to
<dirent.h>?

Thanks.

Sep 20 '06 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Gaijinco wrote:
Does anyone knows a more documented alternative? Or a good reference to
<dirent.h>?
Try typing "dirent.h" into google and clicking on the first
entry returned. Worked for me.

HTH,
- J.
Sep 20 '06 #2

P: n/a
Gaijinco wrote:
I'm looking for libraries to handle basic operations on files and
subdirectories as listing the files and the subdirectories of a
directory.

Someone suggest me <dirent.h(which is supported by g++) but I
couldn't find clear information about its usage.

Does anyone knows a more documented alternative? Or a good reference to
<dirent.h>?

Thanks.
Do you really need a library, or do you just need to read a directory?
A quick hack would be to use the system function.

system("cmd /C \"dir /b myprog.dir\"");
ifstream dir("myprog.dir");

Other than that: read the plattform specific documentation that came
with your OS and/or compiler. There is some kind of interface to handle
directories on each plattform, you just need to find it.

Sep 20 '06 #3

P: n/a
Gaijinco <ga******@gmail.comwrote:
I'm looking for libraries to handle basic operations on files and
subdirectories as listing the files and the subdirectories of a
directory.

Someone suggest me <dirent.h(which is supported by g++) but I
couldn't find clear information about its usage.

Does anyone knows a more documented alternative? Or a good reference to
<dirent.h>?
Try the Boost Filesystem library.

--
Marcus Kwok
Replace 'invalid' with 'net' to reply
Sep 20 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.