Hi All,

I have the following code which is based of the tut3.cpp example at: http://www.boost.org/doc/libs/1_46_1...tory-iteration

However, I'm not entirely sure how to retrieve the full file path which I'd like to use to get the file size. So essentially the aim is to go through a directory and list all the file sizes. Any help would be greatly appriciated, thanks

Code:
if (exists(p))  {
             if (is_directory(p))  {
                cout << p << " is a directory containing:\n";
            
                copy(directory_iterator(p), directory_iterator(),  // directory_iterator::value_type
                     ostream_iterator<directory_entry>(cout, "\n"));  // is directory_entry, which is
                // path stream inserter
                if (is_regular_file(p)) {
                    cout << p << " size is " << file_size(p) << '\n';
                }
            }