public static IAbsolutePath Combine(this AbsoluteDirectoryPath basePath, IRelativePath path) { return(path == null ? basePath : path.MatchWith( (RelativeFilePath file) => (IAbsolutePath)basePath.Combine(file), (RelativeDirectoryPath dir) => (IAbsolutePath)basePath.Combine(dir))); }
public static IRelativePath Rename(this IRelativePath path, string newName) { return(path.MatchWith( (RelativeFilePath file) => (IRelativePath)file.Rename(new FileName(newName)), (RelativeDirectoryPath dir) => (IRelativePath)dir.Rename(new DirectoryName(newName)))); }