thank you sir for your reply ..can you please tell me where can i get
the complete documentation or preferably tutorials on boost filesystem
??
i googled a lot and even on the boost filesystem official site i
cudn't get much .
yours thankfully
mohan gupta
On 4/24/08, Brad
Mohan gupta wrote:
hello every one, can anyone please tell me is there any way to find the files in a directory with some exension say .txt,.doc, .cpp etc ......and then use them ???? all help is appreciated mohan gupta namespace bfs=boost::filesystem;
bfs::path p("/home/user/folder"); bfs::directory_iterator dir_iter(p), dir_end; for(;dir_iter != dir_end; ++dir_iter) { if( bfs::extension(*dir_iter) == ".txt" ) do_something(); elseif( bfs::extension(*dir_iter) == ".doc" ) do_something_different(); }
For the most part not my code :-)
Cheers, Brad