天天看點

周遊檔案

void

listfiles()

{

  namespace  fs  =  boost::filesystem;

  boost::filesystem::path path=boost::filesystem::current_path();

  fs::directory_iterator item_begin(path);

  fs::directory_iterator item_end;

  for ( ;item_begin   !=  item_end; item_begin ++ )

  {

      if (fs::is_directory( * item_begin))

      {

          std::cout  << item_begin ->

path() << " /t[dir] " << std::endl;

              //  printallfile( *

item_begin);

      }

      else

path()<< std::endl;

  }