Beispiel #1
0
 public FatStream(FatDirectoryEntry aEntry)
 {
     mDirectoryEntry = aEntry;
     mFS             = mDirectoryEntry.GetFileSystem();
     mSize           = mDirectoryEntry.mSize;
     if (mDirectoryEntry.mSize > 0)
     {
         mFatTable = mDirectoryEntry.GetFatTable();
     }
 }
Beispiel #2
0
            /// <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;
            }
Beispiel #3
0
 public FatStream(FatDirectoryEntry aEntry)
 {
     mDirectoryEntry = aEntry;
     mFS = mDirectoryEntry.GetFileSystem();
     mSize = mDirectoryEntry.mSize;
     if (mDirectoryEntry.mSize > 0)
     {
         mFatTable = mDirectoryEntry.GetFatTable();
     }
 }
Beispiel #4
0
            /// <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;
            }
Beispiel #5
0
        protected BaseFatStream(Base fileOrDirectory, FatFileSystem fileSystem, ulong firstClusterNumber)
        {
            mFileOrDirectory = fileOrDirectory;
            mFirstClusterNumber = firstClusterNumber;
            mFileSystem = fileSystem;

            mSize = mFileOrDirectory.Size;
            if (mSize > 0)
            {
                mFatTable = mFileSystem.GetFatTable(firstClusterNumber);
            }
        }
Beispiel #6
0
        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();
            }
        }
Beispiel #7
0
        public FatStream(FatDirectoryEntry aFile)
        {
            mDirectoryEntry = aFile;
            mFS = mDirectoryEntry.FileSystem;
            mReadBuffer = mDirectoryEntry.FileSystem.NewClusterArray();

            mSize = this.mDirectoryEntry.Size;
            if (mDirectoryEntry.Size > 0)
            {
                mFatTable = mDirectoryEntry.GetFatTable();
            }
        }
Beispiel #8
0
        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();
            }
        }
Beispiel #9
0
        protected BaseFatStream(Base fileOrDirectory, FatFileSystem fileSystem, ulong firstClusterNumber)
        {
            mFileOrDirectory    = fileOrDirectory;
            mFirstClusterNumber = firstClusterNumber;
            mFileSystem         = fileSystem;

            mSize = mFileOrDirectory.Size;
            if (mSize > 0)
            {
                mFatTable = mFileSystem.GetFatTable(firstClusterNumber);
            }
        }
Beispiel #10
0
        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.");
            }
        }
Beispiel #11
0
        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);
            }
        }
Beispiel #12
0
        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);
            }
        }
Beispiel #13
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.");
            }
        }
Beispiel #14
0
        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!");
            }
        }
Beispiel #15
0
        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!");
            }
        }
Beispiel #16
0
 public Fat(FatFileSystem aFileSystem, ulong aFirstSector)
 {
     mFileSystem = aFileSystem;
     mFirstSector = aFirstSector;
 }
Beispiel #17
0
 public Fat(FatFileSystem aFileSystem, ulong aFirstSector)
 {
     mFileSystem  = aFileSystem;
     mFirstSector = aFirstSector;
 }