In the regular .NET Framework, there are a number of methods for retrieving a subset of files in a directory based on a search pattern, for example DirectoryInfo.GetFiles(string searchPattern).

Is there a corresponding method for Windows Store applications? .NET for Windows Store apps does not contain the Directory or DirectoryInfo classes, and neither of the StorageFolder.GetFilesAsync overloads in the Windows API support search patterns.

有帮助吗?

解决方案

The Windows.Storage.Search namespace allows you to do file searches with patterns. Also, the Programmatic file search sample from Microsoft demonstrates how to use the api.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top