MCPcopy Create free account
hub / github.com/PurpleI2P/i2pd / Path

Method Path

libi2pd/FS.cpp:333–344  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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);

Callers 6

GetAddressMethod · 0.80
AddAddressMethod · 0.80
SaveMethod · 0.80
LoadMethod · 0.80
NetDb.cppFile · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected