Is there a faster way than this to find all the files in a directory and all sub directories?

前端 未结 16 1413
盖世英雄少女心
盖世英雄少女心 2020-11-29 17:49

I\'m writing a program that needs to search a directory and all its sub directories for files that have a certain extension. This is going to be used both on a local, and a

16条回答
  •  野趣味
    野趣味 (楼主)
    2020-11-29 18:02

    You can use parallel foreach (.Net 4.0) or you can try Poor Man's Parallel.ForEach Iterator for .Net3.5 . That can speed-up your search.

提交回复
热议问题