string path_files_md5_hash(const string& dir) { /* computes md5 hash of all files in the directory */ MD5Hash hash; path_files_md5_hash_recursive(hash, dir); return hash.get_hex(); }
const string& CacheData::get_filename() { if(!have_filename) { MD5Hash hash; foreach(const CacheBuffer& buffer, buffers) if(buffer.size) hash.append((uint8_t*)buffer.data, buffer.size); filename = name + "_" + hash.get_hex(); have_filename = true; }