public void CreateDirectoryTree()
 {
     using (var testEnvironment = StreamTestEnvironment.FromExistingVhdx(true))
     {
         using (var filesystem = new ExFatPathFilesystem(testEnvironment.PartitionStream))
         {
             var now  = DateTime.UtcNow;
             var path = @"a\b\c";
             filesystem.CreateDirectory(path);
             var d = filesystem.GetCreationTimeUtc(path);
             Assert.IsTrue(IsAlmostMoreRecentThan(d, now));
         }
     }
 }
 public void CreateFileTree()
 {
     using (var testEnvironment = StreamTestEnvironment.FromExistingVhdx(true))
     {
         using (var filesystem = new ExFatPathFilesystem(testEnvironment.PartitionStream))
         {
             filesystem.CreateDirectory("a");
             using (var s = filesystem.Open(@"a\b.txt", FileMode.Create, FileAccess.ReadWrite))
                 s.WriteByte(66);
             using (var r = filesystem.Open(@"a\b.txt", FileMode.Open, FileAccess.Read))
             {
                 Assert.AreEqual(66, r.ReadByte());
                 Assert.AreEqual(-1, r.ReadByte());
             }
         }
     }
 }
Esempio n. 3
0
 /// <inheritdoc />
 public override void CreateDirectory(string path)
 {
     _filesystem.CreateDirectory(path);
 }