From 4b4e1575dc802669be5602bda41d7e8e7eb15680 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6nke=20Ludwig?= Date: Tue, 8 Nov 2016 14:48:18 +0100 Subject: [PATCH] Extend the Path interface somewhat. --- source/vibe/core/path.d | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/source/vibe/core/path.d b/source/vibe/core/path.d index ab70a33..560cf3b 100644 --- a/source/vibe/core/path.d +++ b/source/vibe/core/path.d @@ -21,6 +21,11 @@ struct Path { return m_path.startsWith('/'); } + @property bool endsWithSlash() + const { + import std.algorithm.searching : endsWith; + return m_path.endsWith('/'); + } @property void endsWithSlash(bool v) { import std.algorithm.searching : endsWith; @@ -49,7 +54,7 @@ struct Path { void normalize() { - assert(false, "TODO!"); + //assert(false, "TODO!"); } // FIXME: this should decompose the two paths into their parts and compare the part sequence