Extend the Path interface somewhat.

This commit is contained in:
Sönke Ludwig 2016-11-08 14:48:18 +01:00
parent eb0697d6e4
commit 4b4e1575dc

View file

@ -21,6 +21,11 @@ struct Path {
return m_path.startsWith('/'); return m_path.startsWith('/');
} }
@property bool endsWithSlash()
const {
import std.algorithm.searching : endsWith;
return m_path.endsWith('/');
}
@property void endsWithSlash(bool v) @property void endsWithSlash(bool v)
{ {
import std.algorithm.searching : endsWith; import std.algorithm.searching : endsWith;
@ -49,7 +54,7 @@ struct Path {
void normalize() void normalize()
{ {
assert(false, "TODO!"); //assert(false, "TODO!");
} }
// FIXME: this should decompose the two paths into their parts and compare the part sequence // FIXME: this should decompose the two paths into their parts and compare the part sequence