/// <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; }
public FatDirectoryEntry( FatFileSystem aFileSystem, FatDirectoryEntry aParent, string aFullPath, string aName, uint aFirstCluster) : base(aFileSystem, aParent, aFullPath, aName, 0, DirectoryEntryTypeEnum.Directory) { if (aFirstCluster < aFileSystem.RootCluster) { throw new ArgumentOutOfRangeException(nameof(aFirstCluster)); } mFirstClusterNum = aFirstCluster; mEntryHeaderDataOffset = 0; }
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."); } }