public void ReadAllFiles() { using (var testEnvironment = StreamTestEnvironment.FromExistingVhdx()) { using (var filesystem = new ExFatFileSystem(testEnvironment.PartitionStream)) { var allFiles = filesystem.GetFiles("", "0*", SearchOption.AllDirectories); Assert.IsTrue(allFiles.All(p => Path.GetFileName(p).StartsWith("0"))); } } }
public void ReadRootFiles() { using (var testEnvironment = StreamTestEnvironment.FromExistingVhdx()) { using (var filesystem = new ExFatFileSystem(testEnvironment.PartitionStream)) { var allFiles = filesystem.GetFiles(""); Assert.IsTrue(allFiles.Contains(DiskContent.LongContiguousFileName)); Assert.IsTrue(allFiles.Contains(DiskContent.LongSparseFile1Name)); Assert.IsTrue(allFiles.Contains(DiskContent.LongSparseFile2Name)); Assert.IsFalse(allFiles.Contains(DiskContent.EmptyRootFolderFileName)); Assert.IsFalse(allFiles.Contains(DiskContent.LongFolderFileName)); } } }