public FatStream(FatDirectoryEntry aEntry) { mDirectoryEntry = aEntry; mFS = mDirectoryEntry.GetFileSystem(); mSize = mDirectoryEntry.mSize; if (mDirectoryEntry.mSize > 0) { mFatTable = mDirectoryEntry.GetFatTable(); } }
public FatStream(FatDirectoryEntry aEntry) { Global.mFileSystemDebugger.SendInternal("FatStream with entry " + aEntry); mDirectoryEntry = aEntry; mFS = mDirectoryEntry.GetFileSystem(); mSize = mDirectoryEntry.mSize; if (mDirectoryEntry.mSize > 0) { mFatTable = mDirectoryEntry.GetFatTable(); } }
public FatStream(FatDirectoryEntry aFile) { mDirectoryEntry = aFile; mFS = mDirectoryEntry.FileSystem; mReadBuffer = mDirectoryEntry.FileSystem.NewClusterArray(); mSize = this.mDirectoryEntry.Size; if (mDirectoryEntry.Size > 0) { mFatTable = mDirectoryEntry.GetFatTable(); } }
public FatStream(FatDirectoryEntry aEntry) { if (aEntry == null) { throw new ArgumentNullException(nameof(aEntry)); } mDirectoryEntry = aEntry; mFS = aEntry.GetFileSystem(); mFatTable = aEntry.GetFatTable(); mSize = aEntry.mSize; if (mFatTable == null) { throw new Exception("The fat chain returned for the directory entry was null."); } }
public FatStream(FatDirectoryEntry aEntry) { Global.mFileSystemDebugger.SendInternal($"FatStream with entry {aEntry}"); mDirectoryEntry = aEntry; mFS = mDirectoryEntry.GetFileSystem(); mSize = mDirectoryEntry.mSize; Global.mFileSystemDebugger.SendInternal("FatStream with mSize {mSize}"); Global.mFileSystemDebugger.SendInternal("Getting FatTable"); // We get always the FatTable if the file is empty too mFatTable = mDirectoryEntry.GetFatTable(); // What to do if this should happen? Throw exception? if (mFatTable == null) { Global.mFileSystemDebugger.SendInternal("FatTable got but it is null!"); } }