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

Method Init

libi2pd_client/AddressBook.cpp:81–97  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

79 };
80
81 bool AddressBookFilesystemStorage::Init()
82 {
83 storage.SetPlace(i2p::fs::GetDataDir());
84 // init storage
85 if (storage.Init(i2p::data::GetBase32SubstitutionTable(), 32))
86 {
87 // init ETags
88 etagsPath = i2p::fs::StorageRootPath (storage, "etags");
89 if (!i2p::fs::Exists (etagsPath))
90 i2p::fs::CreateDirectory (etagsPath);
91 // init address files
92 indexPath = i2p::fs::StorageRootPath (storage, "addresses.csv");
93 localPath = i2p::fs::StorageRootPath (storage, "local.csv");
94 return true;
95 }
96 return false;
97 }
98
99 std::shared_ptr<const i2p::data::IdentityEx> AddressBookFilesystemStorage::GetAddress (const i2p::data::IdentHash& ident)
100 {

Callers 1

StartMethod · 0.45

Calls 5

StorageRootPathFunction · 0.85
ExistsFunction · 0.85
CreateDirectoryFunction · 0.85
SetPlaceMethod · 0.80

Tested by

no test coverage detected