I am using the Boost::FileSystem library with C++ running under Linux platform and I have a question following:
I would like to have a list of files which are modified older than a given date time. I don’t know whether the boost::FileSystem offer such a method as:
vector<string> listFiles = boost::FileSystem::getFiles("\directory", "01/01/2010 12:00:00");
If yes, could you please provide sample code?
Boost::filesystem doesn’t offer a function exactly like that. But you can use this:
http://www.boost.org/doc/libs/1_45_0/libs/filesystem/v3/doc/reference.html#last_write_time
as a basis to write your own. Here is some sample code using last_write_time: