mirror of
https://github.com/glest/glest-source.git
synced 2025-08-10 18:34:05 +02:00
Ported latest linux changes to win32
This commit is contained in:
@@ -122,7 +122,9 @@ bool isdir(const char *path);
|
|||||||
void findDirs(const vector<string> &paths, vector<string> &results, bool errorOnNotFound=false);
|
void findDirs(const vector<string> &paths, vector<string> &results, bool errorOnNotFound=false);
|
||||||
void findAll(const vector<string> &paths, const string &fileFilter, vector<string> &results, bool cutExtension=false, bool errorOnNotFound=true);
|
void findAll(const vector<string> &paths, const string &fileFilter, vector<string> &results, bool cutExtension=false, bool errorOnNotFound=true);
|
||||||
void findAll(const string &path, vector<string> &results, bool cutExtension=false, bool errorOnNotFound=true);
|
void findAll(const string &path, vector<string> &results, bool cutExtension=false, bool errorOnNotFound=true);
|
||||||
|
int32 getFolderTreeContentsCheckSumRecursively(vector<string> paths, string pathSearchString, const string filterFileExt, Checksum *recursiveChecksum);
|
||||||
int32 getFolderTreeContentsCheckSumRecursively(const string &path, const string &filterFileExt, Checksum *recursiveChecksum);
|
int32 getFolderTreeContentsCheckSumRecursively(const string &path, const string &filterFileExt, Checksum *recursiveChecksum);
|
||||||
|
vector<std::pair<string,int32> > getFolderTreeContentsCheckSumListRecursively(vector<string> paths, string pathSearchString, const string filterFileExt, vector<std::pair<string,int32> > *recursiveMap);
|
||||||
vector<std::pair<string,int32> > getFolderTreeContentsCheckSumListRecursively(const string &path, const string &filterFileExt, vector<std::pair<string,int32> > *recursiveMap);
|
vector<std::pair<string,int32> > getFolderTreeContentsCheckSumListRecursively(const string &path, const string &filterFileExt, vector<std::pair<string,int32> > *recursiveMap);
|
||||||
void createDirectoryPaths(string Path);
|
void createDirectoryPaths(string Path);
|
||||||
string extractDirectoryPathFromFile(string filename);
|
string extractDirectoryPathFromFile(string filename);
|
||||||
|
@@ -321,6 +321,17 @@ bool EndsWith(const string &str, const string& key)
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//finds all filenames like path and gets their checksum of all files combined
|
||||||
|
int32 getFolderTreeContentsCheckSumRecursively(vector<string> paths, string pathSearchString, const string filterFileExt, Checksum *recursiveChecksum) {
|
||||||
|
Checksum checksum = (recursiveChecksum == NULL ? Checksum() : *recursiveChecksum);
|
||||||
|
int count = paths.size();
|
||||||
|
for(int idx = 0; idx < count; ++idx) {
|
||||||
|
string path = paths[idx] + pathSearchString;
|
||||||
|
getFolderTreeContentsCheckSumRecursively(path, filterFileExt, recursiveChecksum);
|
||||||
|
}
|
||||||
|
return checksum.getSum();
|
||||||
|
}
|
||||||
|
|
||||||
//finds all filenames like path and gets their checksum of all files combined
|
//finds all filenames like path and gets their checksum of all files combined
|
||||||
int32 getFolderTreeContentsCheckSumRecursively(const string &path, const string &filterFileExt, Checksum *recursiveChecksum) {
|
int32 getFolderTreeContentsCheckSumRecursively(const string &path, const string &filterFileExt, Checksum *recursiveChecksum) {
|
||||||
|
|
||||||
@@ -402,6 +413,16 @@ int32 getFolderTreeContentsCheckSumRecursively(const string &path, const string
|
|||||||
return checksum.getSum();
|
return checksum.getSum();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
vector<std::pair<string,int32> > getFolderTreeContentsCheckSumListRecursively(vector<string> paths, string pathSearchString, string filterFileExt, vector<std::pair<string,int32> > *recursiveMap) {
|
||||||
|
vector<std::pair<string,int32> > checksumFiles = (recursiveMap == NULL ? vector<std::pair<string,int32> >() : *recursiveMap);
|
||||||
|
int count = paths.size();
|
||||||
|
for(int idx = 0; idx < count; ++idx) {
|
||||||
|
string path = paths[idx] + pathSearchString;
|
||||||
|
getFolderTreeContentsCheckSumListRecursively(path, filterFileExt, &checksumFiles);
|
||||||
|
}
|
||||||
|
return checksumFiles;
|
||||||
|
}
|
||||||
|
|
||||||
//finds all filenames like path and gets the checksum of each file
|
//finds all filenames like path and gets the checksum of each file
|
||||||
vector<std::pair<string,int32> > getFolderTreeContentsCheckSumListRecursively(const string &path, const string &filterFileExt, vector<std::pair<string,int32> > *recursiveMap) {
|
vector<std::pair<string,int32> > getFolderTreeContentsCheckSumListRecursively(const string &path, const string &filterFileExt, vector<std::pair<string,int32> > *recursiveMap) {
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user