Ejemplo n.º 1
0
        internal ClusterStream(FatFileSystem fileSystem, FileAccess access, uint firstCluster, uint length)
        {
            _access = access;
            _reader = fileSystem.ClusterReader;
            _fat = fileSystem.Fat;
            _length = length;

            _knownClusters = new List<uint>();
            if (firstCluster != 0)
            {
                _knownClusters.Add(firstCluster);
            }
            else
            {
                _knownClusters.Add(FatBuffer.EndOfChain);
            }

            if (_length == uint.MaxValue)
            {
                _length = DetectLength();
            }

            _currentCluster = uint.MaxValue;
            _clusterBuffer = new byte[_reader.ClusterSize];
        }
Ejemplo n.º 2
0
 private void LoadFAT()
 {
     _fat = new FileAllocationTable(_type, _data, _bpbRsvdSecCnt, (uint)FatSize, (byte)FatCount, ActiveFat);
 }