accessing LINUX directory tree using C++


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: accessing LINUX directory tree using C++

  1. #1
    Join Date
    Mar 2007
    Posts
    2

    accessing LINUX directory tree using C++

    I work on LINUX. I've a directory (say root_dir=/home) and many sub-directories inside it. Using C++, I want to get all those sub-directories name as unicode string and store them in a list data structure provided by the c++.
    can some suggest how to proceed.

    thank u
    ESHWAR

  2. #2
    Join Date
    Nov 2003
    Posts
    4,118
    you can use the dirent library to traverse the current directory and obtain more inforabout each file (e.g., whether the current file is actually a directory): http://www.devx.com/cplus/10MinuteSolution/26748
    You can then store the results in a standard container such as std::list.
    Danny Kalev

Similar Threads

  1. Replies: 6
    Last Post: 09-06-2005, 05:53 PM
  2. Replies: 0
    Last Post: 07-21-2003, 03:17 PM
  3. Directory tree
    By Keith in forum ASP.NET
    Replies: 1
    Last Post: 09-04-2002, 01:16 PM
  4. My view of the world
    By Kevin Moore in forum .NET
    Replies: 55
    Last Post: 02-27-2002, 04:06 PM
  5. accessing a DOM tree element
    By joe crew in forum XML
    Replies: 0
    Last Post: 04-26-2001, 01:27 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center