問題描述
我正在嘗試加速 C++ 中的目錄枚舉,我正在遞歸到子目錄中.我目前有一個應用程序,它在 FindFirst/FindNextFile API 上花費了 95% 的時間,并且需要幾分鐘來枚舉給定卷上的所有文件.我知道可以更快地做到這一點,因為有一個應用程序可以做到:一切.它會在幾秒鐘內枚舉我的整個驅動器.
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/FindNextFile APIs, and it takes several minutes to enumerate all the files on a given volume. I know it's possible to do this faster because there is an app that does: Everything. It enumerates my entire drive in seconds.
我怎樣才能完成這樣的事情?
How might I accomplish something like this?
推薦答案
我意識到這是一個舊帖子,但是 source forge 上有一個項目可以完全滿足您的要求并且源代碼可用.
I realize this is an old post, but there is a project on source forge that does exactly what you are asking and the source code is available.
您可以在這里找到該項目:NTFS-Search
You can find the project here: NTFS-Search
這篇關于如何在 Win32 上快速枚舉目錄?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!