Added a new helper function for getting a relative-to-repostory path

This commit is contained in:
Thomas Vollstädt 2011-09-05 03:02:15 +02:00
parent 6e141f0f44
commit c767dbc302

View file

@ -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, "");
}
}
}