public FatStream(FatDirectoryEntry aEntry) { mDirectoryEntry = aEntry; mFS = mDirectoryEntry.GetFileSystem(); mSize = mDirectoryEntry.mSize; if (mDirectoryEntry.mSize > 0) { mFatTable = mDirectoryEntry.GetFatTable(); } }
/// <summary> /// Initializes a new instance of the <see cref="Fat"/> class. /// </summary> /// <param name="aFileSystem">The file system.</param> /// <param name="aFatSector">The first sector of the FAT table.</param> public Fat(FatFileSystem aFileSystem, ulong aFatSector) { if (aFileSystem == null) { throw new ArgumentNullException(nameof(aFileSystem)); } mFileSystem = aFileSystem; mFatSector = aFatSector; }
protected BaseFatStream(Base fileOrDirectory, FatFileSystem fileSystem, ulong firstClusterNumber) { mFileOrDirectory = fileOrDirectory; mFirstClusterNumber = firstClusterNumber; mFileSystem = fileSystem; mSize = mFileOrDirectory.Size; if (mSize > 0) { mFatTable = mFileSystem.GetFatTable(firstClusterNumber); } }
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) { mDirectoryEntry = aEntry ?? throw new ArgumentNullException(nameof(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 FatDirectoryStream(Listing.FatDirectory aDirectory) { mDirectory = aDirectory; mFS = mDirectory.FileSystem; if (mFS == null) { FatHelpers.Debug("mFS is null!"); } if (mDirectory.Size > 0) { mFatTable = mFS.GetFatTable(mDirectory.FirstClusterNum); } }
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!"); } }
public FatStream(FatDirectoryEntry aEntry) { Global.mFileSystemDebugger.SendInternal("FatStream.Ctor"); mDirectoryEntry = aEntry; mFS = mDirectoryEntry.GetFileSystem(); mSize = mDirectoryEntry.mSize; Global.mFileSystemDebugger.SendInternal("mSize ="); Global.mFileSystemDebugger.SendInternal(mSize.ToString()); // 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!"); } }
public Fat(FatFileSystem aFileSystem, ulong aFirstSector) { mFileSystem = aFileSystem; mFirstSector = aFirstSector; }