From c91a28ae1d06460d1a09490f1f27a8322a35b5a2 Mon Sep 17 00:00:00 2001 From: Ottermandias Date: Mon, 19 Apr 2021 17:16:52 +0200 Subject: [PATCH] Add Empty to Path types. --- Penumbra/Util/PenumbraPath.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Penumbra/Util/PenumbraPath.cs b/Penumbra/Util/PenumbraPath.cs index 4b7707b5..86717e12 100644 --- a/Penumbra/Util/PenumbraPath.cs +++ b/Penumbra/Util/PenumbraPath.cs @@ -51,6 +51,9 @@ namespace Penumbra.Util public static explicit operator RelPath( string relPath ) => new( relPath ); + public bool Empty + => _path.Length == 0; + public int CompareTo( object rhs ) { return rhs switch @@ -127,6 +130,9 @@ namespace Penumbra.Util public static explicit operator GamePath( string gamePath ) => new( gamePath ); + public bool Empty + => _path.Length == 0; + public string Filename() { var idx = _path.LastIndexOf( "/", StringComparison.Ordinal );