public FATXFileStream(int DeviceIndex, System.IO.FileAccess fa, File file) { xFile = file; // Set our position to the beginning of the file long off = VariousFunctions.GetBlockOffset(xFile.BlocksOccupied[0], xFile); Underlying = new FileStream(VariousFunctions.CreateHandle(DeviceIndex), fa); //Underlying.Position = off; Position = 0; }
public FATXFileStream(int DeviceIndex, System.IO.FileAccess fa, File file) { //Underlying.Close(); if (file.Size == 0) { throw new Exception("Null files not supported"); } xFile = file; // Set our position to the beginning of the file long off = VariousFunctions.GetBlockOffset(xFile.BlocksOccupied[0], xFile); Underlying = new FileStream(VariousFunctions.CreateHandle(DeviceIndex), fa); //Underlying.Position = off; Position = 0; }