#include "lastfiles.h"
#include "debug.h"
-#include "support/FileInfo.h"
+#include <boost/filesystem/operations.hpp>
+#include <algorithm>
#include <fstream>
#include <iterator>
+namespace fs = boost::filesystem;
-using namespace lyx::support;
-
-using std::ifstream;
-using std::ofstream;
-using std::getline;
+using std::copy;
using std::endl;
using std::find;
-using std::copy;
+using std::getline;
+using std::string;
+using std::ifstream;
+using std::ofstream;
using std::ostream_iterator;
// we issue a warning. (Lgb)
ifstream ifs(filename.c_str());
string tmp;
- FileInfo fileInfo;
while (getline(ifs, tmp) && files.size() < num_files) {
- if (dostat) {
- if (!(fileInfo.newFile(tmp).exist() &&
- fileInfo.isRegular()))
+ if (dostat && !fs::exists(tmp))
continue;
- }
files.push_back(tmp);
}
}