private void getRecords() { foreach (rawKeyAndRecord record in this.rawRecords) { extentsOverflowFile.HFSPlusExtentKey key = new extentsOverflowFile.HFSPlusExtentKey(); extentsOverflowLeafRecord leafRecord = new extentsOverflowLeafRecord(); leafRecord.extents = new hfsPlusForkData.HFSPlusExtentRecord[8]; key.keyLength = record.keyLength; key.type = (extentsOverflowFile.forkType)record.keyData[0]; key.pad = record.keyData[1]; key.fileID = dataOperations.convToLE(BitConverter.ToUInt32(record.keyData, 2)); key.startBlock = dataOperations.convToLE(BitConverter.ToUInt32(record.keyData, 6)); leafRecord.key = key; for (int i = 0; i < 8; i++) { hfsPlusForkData.HFSPlusExtentRecord extent = new hfsPlusForkData.HFSPlusExtentRecord(); extent.startBlock = dataOperations.convToLE(BitConverter.ToUInt32(record.recordData, i * 8)); extent.blockCount = dataOperations.convToLE(BitConverter.ToUInt32(record.recordData, (i * 8) + 4)); leafRecord.extents[i] = extent; } this.records.Add(leafRecord); } }
private void getRecords() { foreach (rawKeyAndRecord record in this.rawRecords) { extentsOverflowFile.HFSPlusExtentKey key = new extentsOverflowFile.HFSPlusExtentKey(); extentsOverflowLeafRecord leafRecord = new extentsOverflowLeafRecord(); leafRecord.extents = new hfsPlusForkData.HFSPlusExtentRecord[8]; key.keyLength = record.keyLength; key.type = (extentsOverflowFile.forkType)record.keyData[0]; key.pad = record.keyData[1]; key.fileID = dataOperations.convToLE(BitConverter.ToUInt32(record.keyData, 2)); key.startBlock = dataOperations.convToLE(BitConverter.ToUInt32(record.keyData, 6)); leafRecord.key = key; for (int i = 0; i < 8; i++) { hfsPlusForkData.HFSPlusExtentRecord extent = new hfsPlusForkData.HFSPlusExtentRecord(); extent.startBlock = dataOperations.convToLE(BitConverter.ToUInt32(record.recordData, i * 8)); extent.blockCount = dataOperations.convToLE(BitConverter.ToUInt32(record.recordData, (i * 8) + 4)); leafRecord.extents[i] = extent; } this.records.Add(leafRecord); } }
public static extentsOverflowFile.HFSPlusExtentKey buildExtentSearchKey(ref byte[] rawKeyData) { extentsOverflowFile.HFSPlusExtentKey result = new extentsOverflowFile.HFSPlusExtentKey(); result.type = (extentsOverflowFile.forkType)rawKeyData[0]; result.pad = rawKeyData[1]; result.fileID = dataOperations.convToLE(BitConverter.ToUInt32(rawKeyData, 2)); result.startBlock = dataOperations.convToLE(BitConverter.ToUInt32(rawKeyData, 6)); return result; }
public static extentsOverflowFile.HFSPlusExtentKey buildExtentSearchKey(ref byte[] rawKeyData) { extentsOverflowFile.HFSPlusExtentKey result = new extentsOverflowFile.HFSPlusExtentKey(); result.type = (extentsOverflowFile.forkType)rawKeyData[0]; result.pad = rawKeyData[1]; result.fileID = dataOperations.convToLE(BitConverter.ToUInt32(rawKeyData, 2)); result.startBlock = dataOperations.convToLE(BitConverter.ToUInt32(rawKeyData, 6)); return(result); }
private void getAllExtents(extentsOverflowFile eofInput, uint CNID) { extentsOverflowFile.HFSPlusExtentKey extentKey = new extentsOverflowFile.HFSPlusExtentKey(); extentsOverflowLeafNode.extentsOverflowLeafRecord record; extentKey.fileID = CNID; extentKey.type = extentsOverflowFile.forkType.data; while (this.knownDataBlocks < this.totalDataBlocks) { extentKey.startBlock = knownDataBlocks; record = eofInput.getExtentRecordWithKey(extentKey); int i = 0; while (i < 8 && record.extents[i].blockCount > 0) { this.fileContent.dataExtents.Add(record.extents[i]); this.knownDataBlocks += record.extents[i].blockCount; i++; } this.allDataBlocksKnown = knownDataBlocks == totalDataBlocks; } extentKey.type = extentsOverflowFile.forkType.resource; while (this.knownResourceBlocks < this.totalResourceBlocks) { extentKey.startBlock = knownResourceBlocks; record = eofInput.getExtentRecordWithKey(extentKey); int i = 0; while (record.extents[i].blockCount > 0 && i < 8) { this.fileContent.resourceExtents.Add(record.extents[i]); this.knownResourceBlocks += record.extents[i].blockCount; i++; } this.allResourceBlocksKnown = knownResourceBlocks == totalResourceBlocks; } }
private void getAllExtents(extentsOverflowFile eofInput, uint CNID) { extentsOverflowFile.HFSPlusExtentKey extentKey = new extentsOverflowFile.HFSPlusExtentKey(); extentsOverflowLeafNode.extentsOverflowLeafRecord record; extentKey.fileID = CNID; extentKey.type = extentsOverflowFile.forkType.data; while (this.knownDataBlocks < this.totalDataBlocks) { extentKey.startBlock = knownDataBlocks; record = eofInput.getExtentRecordWithKey(extentKey); int i = 0; while (i < 8 && record.extents[i].blockCount > 0) { this.fileContent.dataExtents.Add(record.extents[i]); this.knownDataBlocks += record.extents[i].blockCount; i++; } this.allDataBlocksKnown = knownDataBlocks == totalDataBlocks; } extentKey.type = extentsOverflowFile.forkType.resource; while (this.knownResourceBlocks < this.totalResourceBlocks) { extentKey.startBlock = knownResourceBlocks; record = eofInput.getExtentRecordWithKey(extentKey); int i = 0; while (record.extents[i].blockCount > 0 && i < 8) { this.fileContent.resourceExtents.Add(record.extents[i]); this.knownResourceBlocks += record.extents[i].blockCount; i++; } this.allResourceBlocksKnown = knownResourceBlocks == totalResourceBlocks; } }