32 #include <openssl/md5.h>
58 return _stable_counter;
68 }
catch (
const std::bad_cast&) { };
81 if (!
getFile().isDirectory())
return;
90 for (std::list<io::FATFile>::const_iterator it = filelist.begin(); it != filelist.end(); ++it)
97 else files.insert(of);
102 }
catch (
const std::bad_cast&) { };
107 std::list<ibrcommon::File>
filelist;
110 for (std::list<ibrcommon::File>::const_iterator it = filelist.begin(); it != filelist.end(); ++it)
117 else files.insert(of);
126 if (_last_hash != latest) {
131 if (_stable_counter < std::numeric_limits<size_t>::max()) _stable_counter++;
148 std::stringstream ss;
150 const std::string toHash = ss.str();
151 char hash[MD5_DIGEST_LENGTH];
152 MD5((
unsigned char*)toHash.c_str(), toHash.length(), (
unsigned char*) hash);
153 return FileHash(_file->
getPath(), std::string(hash, MD5_DIGEST_LENGTH));