Added a new helper function for getting a relative-to-repostory path
This commit is contained in:
parent
44f10217f6
commit
23e59615c9
|
@ -17,6 +17,7 @@
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
|
using System.Text.RegularExpressions;
|
||||||
|
|
||||||
namespace SparkleLib {
|
namespace SparkleLib {
|
||||||
|
|
||||||
|
@ -76,5 +77,10 @@ namespace SparkleLib {
|
||||||
DateTime unix_epoch = new DateTime (1970, 1, 1, 0, 0, 0, 0);
|
DateTime unix_epoch = new DateTime (1970, 1, 1, 0, 0, 0, 0);
|
||||||
return unix_epoch.AddSeconds (timestamp);
|
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, "");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue