aboutsummaryrefslogtreecommitdiffstats
path: root/util/folder/path.h
diff options
context:
space:
mode:
authorxinull <xinull@yandex-team.com>2022-08-01 10:56:15 +0300
committerxinull <xinull@yandex-team.com>2022-08-01 10:56:15 +0300
commit47a1bc66262692f81b677e6be91b7e5381dba7e4 (patch)
tree7f01e1e3654cad099426a49590e11da557a210eb /util/folder/path.h
parent5927c2c274fd15f9132b7cdb3069f6eaa9bdb752 (diff)
downloadydb-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.h11
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_;