mirror of
https://github.com/boostorg/filesystem.git
synced 2026-01-30 07:52:08 +00:00
change status_flag to status_flags
[SVN r29552]
This commit is contained in:
@@ -10,12 +10,14 @@
|
||||
|
||||
#include "boost/filesystem/operations.hpp"
|
||||
#include "boost/filesystem/path.hpp"
|
||||
#include "boost/progress.hpp"
|
||||
#include <iostream>
|
||||
|
||||
namespace fs = boost::filesystem;
|
||||
|
||||
int main( int argc, char* argv[] )
|
||||
{
|
||||
boost::progress_timer t( std::clog );
|
||||
|
||||
fs::path full_path( fs::initial_path<fs::path>() );
|
||||
|
||||
@@ -46,12 +48,18 @@ int main( int argc, char* argv[] )
|
||||
{
|
||||
try
|
||||
{
|
||||
if ( fs::is_directory( *dir_itr ) )
|
||||
#if 1
|
||||
fs::status_flag flags( fs::status( *dir_itr ) );
|
||||
#else
|
||||
fs::status_flag flags( fs::file_flag );
|
||||
#endif
|
||||
|
||||
if ( (flags & fs::directory_flag) == fs::directory_flag )
|
||||
{
|
||||
++dir_count;
|
||||
std::cout << dir_itr->leaf() << " [directory]\n";
|
||||
}
|
||||
else if ( fs::is_file( *dir_itr ) )
|
||||
else if ( (flags & fs::file_flag) == fs::file_flag )
|
||||
{
|
||||
++file_count;
|
||||
std::cout << dir_itr->leaf() << "\n";
|
||||
|
||||
Reference in New Issue
Block a user