public override Stream Open()
        {
            if (!Writable)
            {
                return(new WindowsPhysicalDriveStream(Path, Writable));
            }

            foreach (var path in DriveLetters.ToList().Select(driveLetter => @"\\.\" + driveLetter + @""))
            {
                using var win32RawDisk = new Win32RawDisk(path, true);
            }

            return(new WindowsPhysicalDriveStream(Path, Writable));
        }
示例#2
0
 public WindowsPhysicalDriveStream(string path, bool writable)
 {
     this.CanWrite     = writable;
     this.win32RawDisk = new Win32RawDisk(path, writable);
 }