public Stream OpenWrite(Path path) { return File.OpenWrite(path.ToString()); }
public IEnumerable<Path> GetFilesRecursive(Path root, string pattern) { foreach(var item in Directory.GetFiles(root.ToString(), pattern, SearchOption.AllDirectories)) yield return new Path(item); }
public DateTime GetLastWriteTime(Path path) { return File.GetLastWriteTime(path.ToString()); }
public IEnumerable<Path> GetFiles(Path root, string pattern) { foreach(var item in Directory.GetFiles(root.ToString(), pattern)) yield return new Path(item); }
public bool FileExists(Path path) { return File.Exists(path.ToString()); }
public void DeleteFile(Path path) { File.Delete(path.ToString()); }
public void CopyFile(Path from, Path to, bool overwrite) { File.Copy(from.ToString(), to.ToString(), overwrite); }
public void Should_use_Path_DirectorySeparatorChar_for_subdirectories() { var path = new Path("Parent").Combine("Child"); Assert.AreEqual(FXPath.Combine("Parent", "Child"), path.ToString()); }