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