带有搜索模式的StorageFolder.GetFilesAsync()方法?

时间:2013-01-21 10:56:04

标签: c# windows-runtime windows-store-apps storagefile

在常规.NET Framework中,有许多方法可以根据搜索模式检索目录中的文件子集,例如DirectoryInfo.GetFiles(string searchPattern)

Windows Store应用程序是否有相应的方法?用于Windows应用商店应用的 .NET 不包含DirectoryDirectoryInfo类, Windows API 中的StorageFolder.GetFilesAsync重载均未包含>支持搜索模式。

1 个答案:

答案 0 :(得分:3)

Windows.Storage.Search命名空间允许您使用模式进行文件搜索。此外,Microsoft的Programmatic file search sample演示了如何使用api。