How can I quickly enumerate directories on Win32?

前端 未结 6 1787
刺人心
刺人心 2020-12-04 22:30

I\'m trying to speedup directory enumeration in C++, where I\'m recursing into subdirectories. I currently have an app which spends 95% of it\'s time in FindFirst/FindNextFi

6条回答
  •  爱一瞬间的悲伤
    2020-12-04 23:08

    "Everything" accesses directory information at a lower level than the Win32 FindFirst/FindNext APIs.

    I believe it reads and interprets the NTFS MFT structures directly, and that this is one of the main reasons for its performance. It's also why it requires admin privileges and why "Everything" only indexes local or removable NTFS volumes (not network drives, for example).

    A couple other utilities that do the similar things are:

    • FindOnClick by 2Brightsparks
    • Search GT

    A little reverse engineering with a debugger on these tools might give you some insight on the techniques they use.

提交回复
热议问题