StlSoft - how to use their file system functionality?

I am trying to add portability to the file system in an application that I wrote. For this purpose I use stlsoft , but I cannot figure out how to use anything. Is there a tutorial somewhere or an appropriate example? They have samples on the site, but as far as I can see, none of them belong to the file system module.

0
source share
3 answers

... Eh, it looks like I will use Boost.

0
source

Well, Boost.Filesystem is good, but heavy (boost.filesystem + boost.system).

Here is a simple ls utility as an example:

#include <algorithm> #include <iostream> #include <platformstl/platformstl.hpp> #include <platformstl/filesystem/readdir_sequence.hpp> using platformstl::readdir_sequence; int main(int argc, char *argv[]) { readdir_sequence entries(argc > 1 ? argv[1] : ".", readdir_sequence::files|readdir_sequence::directories); std::copy(entries.begin(), entries.end(), std::ostream_iterator<char const*>(std::cout, "\n")); return 0; } 

You can also check out the recls project (recursive LS) at Sourceforge for more details.

+1
source

I donโ€™t know what exactly you are looking for, but here is the documentation for the stlsoft file system module.

0
source

All Articles