static bool GetCdRomDirectories(string[] args) { foreach (var d in physFS.GetCdRomDirs()) { Console.WriteLine(" - {0}", d); } return(true); }
public void DriveEnumeration() { using var pfs = new PhysFS(""); var effectiveCdDrives = DriveInfo.GetDrives() .Where(x => x.DriveType == DriveType.CDRom) .Select(x => x.RootDirectory.FullName) .OrderBy(s => s) .ToArray(); var enumeratedCdDrives = pfs.GetCdRomDirs().OrderBy(s => s); enumeratedCdDrives.Should().BeEquivalentTo(effectiveCdDrives); }
void DriveEnumeration() { using (var pfs = new PhysFS("")) { var effectiveCdDrives = DriveInfo.GetDrives() .Where(x => x.DriveType == DriveType.CDRom) .Select(x => x.RootDirectory.FullName) .ToArray(); var enumeratedCdDrives = pfs.GetCdRomDirs(); Array.Sort(effectiveCdDrives); Array.Sort(enumeratedCdDrives); Assert.Equal(effectiveCdDrives, enumeratedCdDrives); } }