// // Absolute/Relative path conversion // public DirectoryPathRelative GetPathRelativeFrom(DirectoryPathAbsolute path) { if (path == null) { throw new ArgumentNullException(); } if (PathHelper.IsEmpty(this) || PathHelper.IsEmpty(path)) { throw new ArgumentException("Cannot compute a relative path from an empty path."); } return(new DirectoryPathRelative(BasePath.GetPathRelative(path, this))); }
// // Absolute/Relative path conversion // public FilePathRelative GetPathRelativeFrom(DirectoryPathAbsolute path) { if (path == null) { throw new ArgumentNullException(); } if (PathHelper.IsEmpty(this) || PathHelper.IsEmpty(path)) { throw new ArgumentException("Cannot compute a relative path from an empty path."); } string pathRelative = BasePath.GetPathRelative(path, this); return(new FilePathRelative(pathRelative + System.IO.Path.DirectorySeparatorChar + this.FileName)); }