예제 #1
0
파일: FatStream.cs 프로젝트: rebizu/Cosmos
 public FatStream(FatDirectoryEntry aEntry)
 {
     mDirectoryEntry = aEntry;
     mFS = mDirectoryEntry.GetFileSystem();
     mSize = mDirectoryEntry.mSize;
     if (mDirectoryEntry.mSize > 0)
     {
         mFatTable = mDirectoryEntry.GetFatTable();
     }
 }
예제 #2
0
파일: FatStream.cs 프로젝트: Orvid/Cosmos
        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();
            }
        }
예제 #3
0
파일: FatStream.cs 프로젝트: SUTD/Cosmos
        public FatStream(FatDirectoryEntry aFile)
        {
            mDirectoryEntry = aFile;
            mFS = mDirectoryEntry.FileSystem;
            mReadBuffer = mDirectoryEntry.FileSystem.NewClusterArray();

            mSize = this.mDirectoryEntry.Size;
            if (mDirectoryEntry.Size > 0)
            {
                mFatTable = mDirectoryEntry.GetFatTable();
            }
        }
예제 #4
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.");
            }
        }
예제 #5
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!");
            }
        }