How to use this fileInformationFactory.getFilesAsync() ? RRS feed

  • Question

  • 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.

    Wednesday, July 18, 2012 1:01 AM


  • Hi

    I tried your codes in default.js on my computer.

    No error occur at all.

    Could you please give us a simple repro code project?

    You code require Document Library Access Capabilities, make sure you have enable it in your


    • Edited by Dino He Thursday, July 19, 2012 10:26 AM
    • Marked as answer by Dino He Thursday, July 26, 2012 8:21 AM
    Thursday, July 19, 2012 10:26 AM