c++ - StlSoft - how to use their file system functionality? -
i'm trying add portability file system in application wrote. end, i'm using stlsoft, can't figure out how use anything. there tutorial somewhere, or relevant example? have samples on site, far can see none relating filesystem module.
well, boost.filesystem good, heavy (boost.filesystem + boost.system).
here simple "ls" utility 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; }
also can check recls (recursive ls) project on sourceforge more details.
Comments
Post a Comment