コード例 #1
0
 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)));
 }
コード例 #2
0
ファイル: Rename.cs プロジェクト: yongaru/fuse-studio
 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))));
 }