MCPcopy Create free account
hub / github.com/catboost/catboost / TFsPath

Class TFsPath

util/folder/path.h:22–217  ·  view source on GitHub ↗

* Class behaviour is platform-dependent. * It uses platform-dependent separators for path-reconstructing operations. */

Source from the content-addressed store, hash-verified

20 * It uses platform-dependent separators for path-reconstructing operations.
21 */
22class TFsPath {
23private:
24 struct TSplit;
25
26public:
27 TFsPath();
28 TFsPath(const TString& path);
29 TFsPath(const TStringBuf path);
30 TFsPath(const char* path);
31
32 TFsPath(const std::string& path)
33 : TFsPath(TStringBuf(path))
34 {
35 }
36
37 TFsPath(const TFsPath& that);
38 TFsPath(TFsPath&& that);
39
40 TFsPath& operator=(const TFsPath& that);
41 TFsPath& operator=(TFsPath&& that);
42
43 ~TFsPath() = default;
44
45 void CheckDefined() const;
46
47 inline bool IsDefined() const {
48 return Path_.length() > 0;
49 }
50
51 inline explicit operator bool() const {
52 return IsDefined();
53 }
54
55 inline const char* c_str() const {
56 return Path_.c_str();
57 }
58
59 inline operator const TString&() const {
60 return Path_;
61 }
62
63 inline bool operator==(const TFsPath& that) const {
64 return Path_ == that.Path_;
65 }
66
67 TFsPath& operator/=(const TFsPath& that);
68
69 friend TFsPath operator/(const TFsPath& s, const TFsPath& p) {
70 TFsPath ret(s);
71 return ret /= p;
72 }
73
74 const TPathSplit& PathSplit() const;
75
76 TFsPath& Fix();
77
78 inline const TString& GetPath() const {
79 return Path_;

Callers 1

AppendToFsPathFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected