CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Aug 2006
    Posts
    230

    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

  2. #2
    Join Date
    Jan 2006
    Location
    Singapore
    Posts
    6,765

    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.
    C + C++ Compiler: MinGW port of GCC
    Build + Version Control System: SCons + Bazaar

    Look up a C/C++ Reference and learn How To Ask Questions The Smart Way
    Kindly rate my posts if you found them useful

  3. #3
    Join Date
    Feb 2005
    Location
    "The Capital"
    Posts
    5,306

    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured