0

我正在使用此内置方法从目录中搜索文件:

foreach (string file in SafeFileEnumerator.EnumerateFiles(folderBrowserDialog1.SelectedPath, "*.*", SearchOption.AllDirectories))
{

}

搜索时是否可以在我的 UI 上显示当前目录?

4

1 回答 1

1
  • If your SafeFileEnumerator is the Directory class then the answer is No just keep track of the result from System.IO.Path.getDirectory(file) and act when it changes.

  • If it is the class from this question, then you can change the code to raise an event.

于 2013-05-27T18:55:05.827 回答