mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-01-13 19:37:51 +00:00
* FS.cpp : add const to accessors
This commit is contained in:
parent
464a228106
commit
138d57143a
2
FS.cpp
2
FS.cpp
@ -124,7 +124,7 @@ namespace fs {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string HashedStorage::Path(const std::string & ident) {
|
std::string HashedStorage::Path(const std::string & ident) const {
|
||||||
std::string safe_ident = ident;
|
std::string safe_ident = ident;
|
||||||
std::replace(safe_ident.begin(), safe_ident.end(), '/', '-');
|
std::replace(safe_ident.begin(), safe_ident.end(), '/', '-');
|
||||||
std::replace(safe_ident.begin(), safe_ident.end(), '\\', '-');
|
std::replace(safe_ident.begin(), safe_ident.end(), '\\', '-');
|
||||||
|
6
FS.h
6
FS.h
@ -45,12 +45,12 @@ namespace fs {
|
|||||||
|
|
||||||
/** create subdirs in storage */
|
/** create subdirs in storage */
|
||||||
bool Init(const char* chars, size_t cnt);
|
bool Init(const char* chars, size_t cnt);
|
||||||
const std::string & GetRoot() { return this->root; }
|
const std::string & GetRoot() const { return this->root; }
|
||||||
const std::string & GetName() { return this->name; }
|
const std::string & GetName() const { return this->name; }
|
||||||
/** set directory where to place storage directory */
|
/** set directory where to place storage directory */
|
||||||
void SetPlace(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) const;
|
||||||
/** remove file by ident */
|
/** remove file by ident */
|
||||||
void Remove(const std::string & ident);
|
void Remove(const std::string & ident);
|
||||||
/** find all files in storage and store list in provided vector */
|
/** find all files in storage and store list in provided vector */
|
||||||
|
Loading…
Reference in New Issue
Block a user