Esempio n. 1
0
        public RawClusterStream(INtfsContext context, CookedDataRuns cookedRuns, bool isMft)
        {
            _context    = context;
            _cookedRuns = cookedRuns;
            _isMft      = isMft;

            _fsStream        = _context.RawStream;
            _bytesPerCluster = context.BiosParameterBlock.BytesPerCluster;
        }
Esempio n. 2
0
        public NonResidentDataBuffer(INtfsContext context, CookedDataRuns cookedRuns, bool isMft)
        {
            _context    = context;
            _cookedRuns = cookedRuns;

            _rawStream    = new RawClusterStream(_context, _cookedRuns, isMft);
            _activeStream = _rawStream;

            _bytesPerCluster = _context.BiosParameterBlock.BytesPerCluster;
            _ioBuffer        = new byte[_bytesPerCluster];
        }
Esempio n. 3
0
        private static CookedDataRuns CookRuns(NtfsAttribute attribute)
        {
            CookedDataRuns result = new CookedDataRuns();

            foreach (NonResidentAttributeRecord record in attribute.Records)
            {
                if (record.StartVcn != result.NextVirtualCluster)
                {
                    throw new IOException("Invalid NTFS attribute - non-contiguous data runs");
                }

                result.Append(record.DataRuns, record);
            }

            return(result);
        }