public void Rebase(Path source, Path target) { if (!source._isDirectory || !target._isDirectory) { throw new ApplicationException("Rebase parameters \"source\" and \"target\" should both be directory paths."); } Parent = new Path(target + ToString().Substring(source.ToString().Length)).Parent; }
public bool IsDescendantOf(Path source) { return Parent.StartsWith(source.ToString()); }