tags:

views:

32

answers:

1

I'm need to read(simple and already done) and psrse the $MFT - gather files $DATA runs and file names, time stamps and so on.. I have started with this ntfs library, but it is too slow to scan the entire mft.

How can I speed it up or is there another - more faster library?

Thanks, but could you please explain to me why the following code is very slow:

for (ULONG64 i = 0;i < kz;i++)
{
    FileRecordHeader = (FILE_RECORD_HEADER*) &buf[bzp];
    if (FileRecordHeader->Magic != FILE_RECORD_MAGIC)
    {
        goto pd;
    }
    usnaddr = (WORD*)((BYTE*)FileRecordHeader + FileRecordHeader->OffsetOfUS);
    usn = *usnaddr;
    usarray = usnaddr + 1;
    if (!PatchUS((WORD*)FileRecordHeader, rzf / vl->SectorSize, usn, usarray))
    {
        goto pd;
    }
    //ParseAttrs(FileRecordHeader,MASK_FILE_NAME,Attrs,&file);
    Application::DoEvents();
    progressBar1->Value = i;pd:
    bzp = bzp + rzf;
}

or just enumerating through file references isn't faster. I'm just need enumerate mft, but with this code that takes minutes, when this could be done in around 20 seconds(on 22 gb prtition - more size - more slowdown)

A: 

Take a look at the source for the linux drivers: http://www.linux-ntfs.org/doku.php and http://www.tuxera.com/community/ntfs-3g-download/

Anthony Williams