mirror of
https://github.com/glest/glest-source.git
synced 2025-08-18 06:01:17 +02:00
Ported latest linux changes to win32
This commit is contained in:
@@ -321,6 +321,17 @@ bool EndsWith(const string &str, const string& key)
|
||||
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
|
||||
int32 getFolderTreeContentsCheckSumRecursively(const string &path, const string &filterFileExt, Checksum *recursiveChecksum) {
|
||||
|
||||
@@ -402,6 +413,16 @@ int32 getFolderTreeContentsCheckSumRecursively(const string &path, const string
|
||||
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
|
||||
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