| 331 | } |
| 332 | |
| 333 | std::string HashedStorage::Path(const std::string & ident) const { |
| 334 | std::string safe_ident = ident; |
| 335 | std::replace(safe_ident.begin(), safe_ident.end(), '/', '-'); |
| 336 | std::replace(safe_ident.begin(), safe_ident.end(), '\\', '-'); |
| 337 | |
| 338 | std::stringstream t(""); |
| 339 | t << this->root << i2p::fs::dirSep; |
| 340 | t << prefix1 << safe_ident[0] << i2p::fs::dirSep; |
| 341 | t << prefix2 << safe_ident << "." << suffix; |
| 342 | |
| 343 | return t.str(); |
| 344 | } |
| 345 | |
| 346 | void HashedStorage::Remove(const std::string & ident) { |
| 347 | std::string path = Path(ident); |
no outgoing calls
no test coverage detected