2016-03-01 19:30:42 +00:00
|
|
|
module vibe.core.path;
|
|
|
|
|
2016-10-25 06:56:05 +00:00
|
|
|
static import std.path;
|
|
|
|
|
2016-03-01 19:30:42 +00:00
|
|
|
struct Path {
|
|
|
|
nothrow: @safe:
|
|
|
|
private string m_path;
|
|
|
|
|
|
|
|
this(string p)
|
|
|
|
{
|
|
|
|
m_path = p;
|
|
|
|
}
|
|
|
|
|
|
|
|
string toString() const { return m_path; }
|
|
|
|
|
|
|
|
string toNativeString() const { return m_path; }
|
2016-10-25 06:56:05 +00:00
|
|
|
|
|
|
|
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())); }
|
2016-03-01 19:30:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
struct PathEntry {
|
|
|
|
nothrow: @safe:
|
|
|
|
private string m_name;
|
|
|
|
|
|
|
|
this(string name)
|
|
|
|
{
|
|
|
|
m_name = name;
|
|
|
|
}
|
|
|
|
}
|