diff options
author | xinull <xinull@yandex-team.com> | 2022-08-01 10:56:15 +0300 |
---|---|---|
committer | xinull <xinull@yandex-team.com> | 2022-08-01 10:56:15 +0300 |
commit | 47a1bc66262692f81b677e6be91b7e5381dba7e4 (patch) | |
tree | 7f01e1e3654cad099426a49590e11da557a210eb /util/folder/path.h | |
parent | 5927c2c274fd15f9132b7cdb3069f6eaa9bdb752 (diff) | |
download | ydb-47a1bc66262692f81b677e6be91b7e5381dba7e4.tar.gz |
TString -> std::string fix TFsPath copy
Add copy operator and constructor
Create copy with initialized split test
Diffstat (limited to 'util/folder/path.h')
-rw-r--r-- | util/folder/path.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/util/folder/path.h b/util/folder/path.h index 2fb4d6b4ef..e1615a947a 100644 --- a/util/folder/path.h +++ b/util/folder/path.h @@ -34,6 +34,14 @@ public: { } + TFsPath(const TFsPath& that); + TFsPath(TFsPath&& that) = default; + + TFsPath& operator=(const TFsPath& that); + TFsPath& operator=(TFsPath&& that) = default; + + ~TFsPath() = default; + void CheckDefined() const; inline bool IsDefined() const { @@ -114,7 +122,7 @@ public: return that.IsSubpathOf(*this); } - TFsPath RelativeTo(const TFsPath& root) const; //must be subpath of root + TFsPath RelativeTo(const TFsPath& root) const; // must be subpath of root /** * @returns relative path or empty path if root equals to this. @@ -205,6 +213,7 @@ public: private: void InitSplit() const; TSplit& GetSplit() const; + void CopySplitFrom(const TFsPath& that) const; private: TString Path_; |