summaryrefslogtreecommitdiff
path: root/tests/utils/test6.cpp
blob: 6ad9e109d8740c0d96effb9129e1864a8b36d3a4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#include "FileUtils.hpp"

#include <iostream>
#include <algorithm>
#include <stdexcept>

using namespace std;

int main( void )
{
	try {
		vector<string> entries = directory_entries( "test6.DATA", true, true );
		
		sort( entries.begin( ), entries.end( ) );
		
		vector<string>::const_iterator it, end = entries.end( );
		for( it = entries.begin( ); it != end; it++ ) {
			cout << (*it) << endl;
		}
		
		return 0;
	} catch( exception &e ) {
		cerr << "ERROR: " << e.what( ) << endl;
		return 1;
	}
}