Remove expensive path.string() calls, UI changes

This commit is contained in:
Kyle Reed
2023-04-30 22:42:28 -07:00
parent 06643df6a5
commit bf4ed416bd
8 changed files with 254 additions and 147 deletions

View File

@@ -123,6 +123,7 @@ struct path {
return *this;
}
path parent_path() const;
path extension() const;
path filename() const;
path stem() const;
@@ -151,14 +152,23 @@ struct path {
return *this;
}
path& operator/=(const path& p) {
if (_s.back() != preferred_separator)
_s + preferred_separator;
_s += p._s;
return *this;
}
path& replace_extension(const path& replacement = path());
private:
string_type _s;
};
bool operator==(const path& lhs, const path& rhs);
bool operator<(const path& lhs, const path& rhs);
bool operator>(const path& lhs, const path& rhs);
path operator/(const path& lhs, const path& rhs);
using file_status = BYTE;