diff --git a/source/vibe/core/path.d b/source/vibe/core/path.d index bcc7151..21198dd 100644 --- a/source/vibe/core/path.d +++ b/source/vibe/core/path.d @@ -1,5 +1,7 @@ module vibe.core.path; +static import std.path; + struct Path { nothrow: @safe: private string m_path; @@ -12,6 +14,9 @@ struct Path { string toString() const { return m_path; } string toNativeString() const { return m_path; } + + Path opBinary(string op : "~")(string subpath) { return this ~ Path(subpath); } + Path opBinary(string op : "~")(Path subpath) { return Path(std.path.buildPath(m_path, subpath.toString())); } } struct PathEntry {