Exemplo n.º 1
0
        public static catalogFile.HFSPlusCatalogKey buildCatalogTrialKey(absIndexOrLeafNode.rawKeyAndRecord record)
        {
            catalogFile.HFSPlusCatalogKey result = new catalogFile.HFSPlusCatalogKey();

            result.parentID = dataOperations.convToLE(BitConverter.ToUInt32(record.keyData, 0));

            result.nodeName = new byte[record.keyLength - 4];
            Array.Copy(record.keyData, 4, result.nodeName, 0, record.keyLength - 4);

            result.keyLength = record.keyLength;

            return(result);
        }
Exemplo n.º 2
0
        public static HFSPlusAttrKey buildAttrTrialKey(absIndexOrLeafNode.rawKeyAndRecord record)
        {
            HFSPlusAttrKey result = new HFSPlusAttrKey();

            result.fileID     = dataOperations.convToLE(BitConverter.ToUInt32(record.keyData, 2));
            result.startBlock = dataOperations.convToLE(BitConverter.ToUInt32(record.keyData, 6));

            result.attrName = new byte[record.keyLength - 12];
            Array.Copy(record.keyData, 12, result.attrName, 0, record.keyLength - 12);
            result.pad       = dataOperations.convToLE(BitConverter.ToUInt16(record.keyData, 0));
            result.keyLength = record.keyLength;

            return(result);
        }