문제

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