I tried this but it gives an error:
var document_folder = Windows.Storage.KnownFolders.documentsLibrary;
var query_option = new Windows.Storage.Search.QueryOptions(Windows.Storage.Search.CommonFolderQuery.defaultQuery);
var storageFileQueryResult = document_folder.createFolderQuery(Windows.Storage.Search.CommonFileQuery.defaultQuery);
var fileInformationFactory = new Windows.Storage.BulkAccess.FileInformationFactory(storageFileQueryResult, Windows.Storage.FileProperties.ThumbnailMode.documentsView);
fileInformationFactory.getFilesAsync().then(function (a) {
var a = a;
});
Exception was thrown but not handled in user code at line 183, column 5 in Function code
0x80004005 - JavaScript runtime error: Unspecified error
If there is a handler for this exception, the program may be safely continued.