diff options
author | Andreas Baumann <mail@andreasbaumann.cc> | 2014-10-15 13:05:40 +0200 |
---|---|---|
committer | Andreas Baumann <mail@andreasbaumann.cc> | 2014-10-15 13:05:40 +0200 |
commit | 1127e07a2a6d6b3c0cbd342396e6c8af7ee54040 (patch) | |
tree | 1c21fe3da449094d0d7860fe88dc9d6ce26b183d /tests/utils/test6.cpp | |
parent | a4c747472abc18e5fcb5a2e5caf7fe7ed1495027 (diff) | |
download | crawler-1127e07a2a6d6b3c0cbd342396e6c8af7ee54040.tar.gz crawler-1127e07a2a6d6b3c0cbd342396e6c8af7ee54040.tar.bz2 |
added a directory scanner (Linux for now)
Diffstat (limited to 'tests/utils/test6.cpp')
-rwxr-xr-x | tests/utils/test6.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/utils/test6.cpp b/tests/utils/test6.cpp new file mode 100755 index 0000000..839f69b --- /dev/null +++ b/tests/utils/test6.cpp @@ -0,0 +1,20 @@ +#include "FileUtils.hpp" + +#include <iostream> +#include <algorithm> + +using namespace std; + +int main( void ) +{ + 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; +} |