1
0
mirror of https://github.com/PurpleI2P/i2pd.git synced 2025-01-13 11:17:53 +00:00

* FS.cpp : rename method

This commit is contained in:
hagen 2016-02-18 00:00:00 +00:00
parent 2b92a039bb
commit 464a228106
2 changed files with 3 additions and 3 deletions

2
FS.cpp
View File

@ -104,7 +104,7 @@ namespace fs {
return boost::filesystem::remove(path);
}
void HashedStorage::SetRoot(const std::string &path) {
void HashedStorage::SetPlace(const std::string &path) {
root = path + i2p::fs::dirSep + name;
}

4
FS.h
View File

@ -22,7 +22,7 @@ namespace fs {
*
* const char alphabet[8] = {'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h'};
* auto h = HashedStorage("name", "y", "z-", ".txt");
* h.SetRoot("/tmp/hs-test");
* h.SetPlace("/tmp/hs-test");
* h.GetName() -> gives "name"
* h.GetRoot() -> gives "/tmp/hs-test/name"
* h.Init(alphabet, 8); <- creates needed dirs, 8 is size of alphabet
@ -48,7 +48,7 @@ namespace fs {
const std::string & GetRoot() { return this->root; }
const std::string & GetName() { return this->name; }
/** set directory where to place storage directory */
void SetRoot(const std::string & path);
void SetPlace(const std::string & path);
/** path to file with given ident */
std::string Path(const std::string & ident);
/** remove file by ident */