Add Path concatenation operators.
This commit is contained in:
parent
1eb06c4b1a
commit
12daa5c575
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue