Thread: geting full path of files and folders (boost::filesystem)

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

    geting full path of files and folders (boost::filesystem)

    Hello all
    im trying to get full path of files and folders.
    im using boost::filesystem to loop throw folders
    with this :
    Code:
    for( fs::recursive_directory_iterator it(dir_path); it != fs::recursive_directory_iterator(); ++it)
        {
            string ss = it->leaf();
        }
    how can i get the full path of ss?
    thanks

  2. #2
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,895
    Have you tried it->string()?

    If that doesn't give you the full path, try complete(*it).string().
    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

  3. #3
    Registered User
    Join Date
    Mar 2008
    Posts
    58
    thanks
    it workes

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Difference between files and folders?
    By fanoliv in forum C Programming
    Replies: 4
    Last Post: 06-20-2006, 09:15 AM
  2. List files in a directory (without folders)
    By 3saul in forum Linux Programming
    Replies: 4
    Last Post: 04-20-2006, 01:08 AM
  3. Setting DACL for Files and Folders
    By IfYouSaySo in forum Windows Programming
    Replies: 6
    Last Post: 01-07-2006, 01:27 AM
  4. Batch file programming
    By year2038bug in forum Tech Board
    Replies: 10
    Last Post: 09-05-2005, 03:30 PM
  5. Folders and text files
    By tim545666 in forum C++ Programming
    Replies: 11
    Last Post: 02-17-2002, 04:15 PM