diff --git a/SparkleLib/SparkleHelpers.cs b/SparkleLib/SparkleHelpers.cs index 741648d7..9a00fef3 100644 --- a/SparkleLib/SparkleHelpers.cs +++ b/SparkleLib/SparkleHelpers.cs @@ -17,6 +17,7 @@ using System; using System.IO; +using System.Text.RegularExpressions; namespace SparkleLib { @@ -76,5 +77,10 @@ namespace SparkleLib { DateTime unix_epoch = new DateTime (1970, 1, 1, 0, 0, 0, 0); return unix_epoch.AddSeconds (timestamp); } + + // Gets the relative path of two hirarchical absolute paths + public static string DiffPaths(string target, string source) { + return target.Replace(source + Path.DirectorySeparatorChar, ""); + } } }