123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- using System;
- using System.Collections.Generic;
- using System.Text;
- using Utilities;
- namespace DiskAccessLibrary.FileSystems.NTFS
- {
- public class FileNameIndexEntry
- {
- public MftSegmentReference FileReference;
- public ushort RecordLength;
- public ushort FileNameOffset;
- public IndexEntryFlags IndexFlags;
-
- public FileNameRecord Record;
- public FileNameIndexEntry(byte[] buffer, int offset)
- {
- FileReference = new MftSegmentReference(buffer, offset + 0x00);
- RecordLength = LittleEndianConverter.ToUInt16(buffer, offset + 0x08);
- FileNameOffset = LittleEndianConverter.ToUInt16(buffer, offset + 0x0A);
- IndexFlags = (IndexEntryFlags)LittleEndianConverter.ToUInt16(buffer, offset + 0x0C);
- if (RecordLength > 16)
- {
- Record = new FileNameRecord(buffer, offset + 0x10);
- }
- }
- public bool IsLastEntry
- {
- get
- {
- return ((IndexFlags & IndexEntryFlags.LastEntryInNode) > 0);
- }
- }
- public string FileName
- {
- get
- {
- return Record.FileName;
- }
- }
- public FilenameNamespace Namespace
- {
- get
- {
- return Record.Namespace;
- }
- }
- }
- }
|