| 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 | { |
no test coverage detected