Boost logo

Boost Users :

From: Fred J. (phddas_at_[hidden])
Date: 2004-09-12 16:32:00


Hello
I am trying to print out the full "file path" to all
the "only" files in a given dir.
appriciate any help in checking this code out, I
really don't know what not working.

thanks

#include
"/usr/include/boost/filesystem/operations.hpp"
#include "/usr/include/boost/filesystem/fstream.hpp"
#include "/usr/include/boost/filesystem/path.hpp"
#include <iostream>
namespace fs = boost::filesystem;

int main(){
 fs::path full_path( fs::initial_path() );

 full_path = fs::system_complete( fs::path(
"/home/sam", fs::native ) );

   fs::directory_iterator end_itr;
   for ( fs::directory_iterator itr( full_path );
         itr != end_itr;
         ++itr )
      {
         if ( !fs::is_directory( *itr))
            std::cout << *itr << std::endl;
      }
}

                
__________________________________
Do you Yahoo!?
Take Yahoo! Mail with you! Get it on your mobile phone.
http://mobile.yahoo.com/maildemo


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net