private Directory CreateSystemDirectory(long mftIndex) { FileRecord fileRec = _context.Mft.AllocateRecord((uint)mftIndex, FileRecordFlags.None); fileRec.Flags = FileRecordFlags.InUse | FileRecordFlags.IsDirectory; fileRec.SequenceNumber = (ushort)mftIndex; Directory dir = new Directory(_context, fileRec); StandardInformation.InitializeNewFile(dir, FileAttributeFlags.Hidden | FileAttributeFlags.System); dir.CreateIndex("$I30", AttributeType.FileName, AttributeCollationRule.Filename); dir.UpdateRecordInMft(); return dir; }