locked
Does StorageFileQueryResult cache its results?

    Question

  • It seems that storageFolder.createFileQuery() creates a result that caches files. If I call result.getFilesAsync() the first time I get 2 files back which are in the folder.

    Then I copy another file into the folder (programmatically) and call result.getFilesAsync() again. It still returns 2 files (the ones returned before). The newly copied file is not recognized.

    Is that a bug or intentionally? How do I get a fresh set of files that actually represent the state of a folder without recreating the file query every time (which seems to work and returns 3 files)?

    • Edited by phil_ke Wednesday, May 22, 2013 3:33 PM
    Wednesday, May 22, 2013 3:32 PM