fixed update of DirHash list and FileHash list when files and dirs are removed, while keeping the cost low

This commit is contained in:
csoler 2016-09-27 23:13:59 +02:00
parent 5547d71ac7
commit bf0777fd9e
2 changed files with 62 additions and 32 deletions

View file

@ -115,8 +115,8 @@ public:
// hash stuff
bool getDirHashFromIndex(const DirectoryStorage::EntryIndex& index,RsFileHash& hash) const ;
bool getIndexFromDirHash(const RsFileHash& hash,DirectoryStorage::EntryIndex& index) const ;
bool getIndexFromFileHash(const RsFileHash& hash,DirectoryStorage::EntryIndex& index) const ;
bool getIndexFromDirHash(const RsFileHash& hash,DirectoryStorage::EntryIndex& index) ;
bool getIndexFromFileHash(const RsFileHash& hash,DirectoryStorage::EntryIndex& index) ;
// file/dir access and modification
bool findSubDirectory(DirectoryStorage::EntryIndex e,const std::string& s) const ; // returns true when s is the name of a sub-directory in the given entry e
@ -146,7 +146,7 @@ public:
int searchBoolExp(RsRegularExpression::Expression * exp, std::list<DirectoryStorage::EntryIndex> &results) const ;
int searchTerms(const std::list<std::string>& terms, std::list<DirectoryStorage::EntryIndex> &results) const ; // does a logical OR between items of the list of terms
bool check(std::string& error_string) const ;// checks consistency of storage.
bool check(std::string& error_string) ;// checks consistency of storage.
void print() const;