-void ReadDirToVectorOfUnits(const char *Path, std::vector<Unit> *V) {
- for (auto &X : ListFilesInDir(Path))
- V->push_back(FileToVector(DirPlusFile(Path, X)));
+void ReadDirToVectorOfUnits(const char *Path, std::vector<Unit> *V,
+ long *Epoch) {
+ long E = Epoch ? *Epoch : 0;
+ for (auto &X : ListFilesInDir(Path, Epoch)) {
+ auto FilePath = DirPlusFile(Path, X);
+ if (Epoch && GetEpoch(FilePath) < E) continue;
+ V->push_back(FileToVector(FilePath));
+ }