Browse Source

* FS.cpp : rename method

pull/388/head
hagen 8 years ago
parent
commit
464a228106
  1. 2
      FS.cpp
  2. 4
      FS.h

2
FS.cpp

@ -104,7 +104,7 @@ namespace fs {
return boost::filesystem::remove(path); 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; root = path + i2p::fs::dirSep + name;
} }

4
FS.h

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

Loading…
Cancel
Save