Thread: List All files recursively cross platform

  1. #1
    Registered User
    Join Date
    Mar 2008
    Posts
    58

    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
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    28,413
    Boost and POCO have filesystem libraries that you can use.
    Quote Originally Posted by Bjarne Stroustrup (2000-10-14)
    I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.
    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  3. #3
    Registered User
    Join Date
    Mar 2008
    Posts
    58
    thanks for the fast reply
    im looking for some kind of small lib like
    curl or pthreads

  4. #4
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,895
    Boost.Filesystem is not big.
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  5. #5
    Registered User
    Join Date
    Mar 2008
    Posts
    58
    the problem i have only visual studio 6
    can i compile it with vc6?

  6. #6
    Registered User
    Join Date
    Apr 2008
    Posts
    890
    Quote Originally Posted by umen242 View Post
    the problem i have only visual studio 6
    can i compile it with vc6?
    Have you tried?

  7. #7
    and the hat of sweating
    Join Date
    Aug 2007
    Location
    Toronto, ON
    Posts
    3,545
    Quote Originally Posted by umen242 View Post
    the problem i have only visual studio 6
    can i compile it with vc6?
    Throw that crap out and get the latest version.
    Here's the free express edition if you don't feel like buying it: http://www.microsoft.com/express/download/

  8. #8
    Registered User
    Join Date
    Mar 2008
    Posts
    58
    i have all my project and related libs compiled with vc6 this will take me to much time to
    move to vs 2005 or something

  9. #9
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,895
    There's no reason to recompile any libraries. But if you want to use Boost, you need something better than VC6.
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  10. #10
    and the hat of sweating
    Join Date
    Aug 2007
    Location
    Toronto, ON
    Posts
    3,545
    I thought Boost was supposed to be compattible with VC++ 6.0 though? Or is it only some Boost libraries that are?

  11. #11
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,895
    Some of them are. I don't know about Filesystem. I do know that no one bothers to test the newer libraries. I also know that there is no regular regression testing on 6, so it might break at any time.
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  12. #12
    Registered User
    Join Date
    Mar 2008
    Posts
    58
    ok i considering to move to the vs2005 the free version ( or what ever it called ..)
    can you tell me please how big is boost:filesystem lib ? can it be compiled statically with my app ?

  13. #13
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    28,413
    ok i considering to move to the vs2005 the free version ( or what ever it called ..)
    Now it would be the 2008 version: Microsoft Visual Studio 2008 Express.
    Quote Originally Posted by Bjarne Stroustrup (2000-10-14)
    I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.
    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  14. #14
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,895
    The release-mode shared object of the filesystem library is 64k large with my GCC 4.1.2. If you link statically, the parts you actually link to will probably be smaller.
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  15. #15
    Registered User
    Join Date
    Mar 2008
    Posts
    58
    can someone please point me to link where i can download the static lib for debug and release
    thanks allot

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Adding directory/file names to a linked list
    By thoseion in forum C Programming
    Replies: 13
    Last Post: 12-08-2006, 01:13 PM
  2. Reverse function for linked list
    By Brigs76 in forum C++ Programming
    Replies: 1
    Last Post: 10-25-2006, 10:01 AM
  3. instantiated from here: errors...
    By advocation in forum C++ Programming
    Replies: 5
    Last Post: 03-27-2005, 09:01 AM
  4. Linked List
    By jpipitone in forum C Programming
    Replies: 4
    Last Post: 03-30-2003, 09:27 PM
  5. problem with structures and linked list
    By Gkitty in forum C Programming
    Replies: 6
    Last Post: 12-12-2002, 06:40 PM