mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-28 11:47:48 +02:00
local addresses
This commit is contained in:
parent
7c8036807a
commit
803f11bebb
3 changed files with 54 additions and 19 deletions
15
FS.h
15
FS.h
|
@ -48,8 +48,8 @@ namespace fs {
|
|||
|
||||
/** create subdirs in storage */
|
||||
bool Init(const char* chars, size_t cnt);
|
||||
const std::string & GetRoot() const { return this->root; }
|
||||
const std::string & GetName() const { return this->name; }
|
||||
const std::string & GetRoot() const { return root; }
|
||||
const std::string & GetName() const { return name; }
|
||||
/** set directory where to place storage directory */
|
||||
void SetPlace(const std::string & path);
|
||||
/** path to file with given ident */
|
||||
|
@ -138,6 +138,17 @@ namespace fs {
|
|||
|
||||
return s.str();
|
||||
}
|
||||
|
||||
template<typename Storage, typename... Filename>
|
||||
std::string StorageRootPath (const Storage& storage, Filename... filenames)
|
||||
{
|
||||
std::stringstream s("");
|
||||
s << storage.GetRoot ();
|
||||
_ExpandPath(s, filenames...);
|
||||
|
||||
return s.str();
|
||||
}
|
||||
|
||||
} // fs
|
||||
} // i2p
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue