Click to See Complete Forum and Search --> : List All files recursively cross platform
umen
May 5th, 2008, 08:48 AM
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
laserlight
May 5th, 2008, 09:04 AM
Boost (http://www.boost.org) and POCO (http://pocoproject.org) 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.
exterminator
May 5th, 2008, 09:26 AM
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/libs/filesystem/example/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.
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.