|
-
May 5th, 2008, 08:48 AM
#1
List All files recursively cross platform
Hello all
im looking for away to get all files names and there properties ( read write executable and so on ) but cross platform
is there any good small library that doing that ? if not how can i do it in most effective way ?
thanks
-
May 5th, 2008, 09:04 AM
#2
Re: List All files recursively cross platform
Boost and POCO have filesystem libraries that you can use.
Incidentally, I suggest that you keep your questions to one forum, and only ask the same question on another forum if you find the answers to be unsatisfactory.
-
May 5th, 2008, 09:26 AM
#3
Re: List All files recursively cross platform
I recently used boost filesystem. You could try it out. Here is a sample to do something like the "ls" command on unix. Link - http://www.boost.org/doc/libs/1_35_0.../simple_ls.cpp
You would need to enhance it to loop recursively if it is a directory. Could use recursion or just iteration.
To get the file proporties, it might be not possible for a portable library but try searching through the documentation about what all stats can it give you for a file.
Can you help me with my homework assignment?, Before you post!, Use code tags, How to post!, Codeguru technical FAQs, C++ FAQ Lite, Stroustrup: C++ Style and Technique FAQ, Guru of the Week, Comeau C and C++ FAQs, Comeau C++ Templates FAQs, CUJ @ DDJ, Spam threshold
My Blogs : Learning C++ is fun | Abnegator's reflections
Open Threads : C++ Aha! Moments | Nature of work in C++?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|