1 // filesystem tut6c.cpp --------------------------------------------------------------//
3 // Copyright Beman Dawes 2010
5 // Distributed under the Boost Software License, Version 1.0.
6 // See http://www.boost.org/LICENSE_1_0.txt
8 // Library home page: http://www.boost.org/libs/filesystem
12 #include <boost/filesystem.hpp>
13 #include <boost/system/error_code.hpp>
15 using namespace boost::filesystem
;
16 using namespace boost::system
;
18 int main(int argc
, char* argv
[])
22 std::cout
<< "Usage: tut6c path\n";
27 for (recursive_directory_iterator
it (argv
[1], ec
);
28 it
!= recursive_directory_iterator();
31 for (int i
= 0; i
<= it
.level(); ++i
)
34 std::cout
<< it
->path() << '\n';