locked
Why is a filequery change listener triggered when the thumbnail is refreshed by Explorer? RRS feed

  • Question

  • I have a FileQuery like this:

    trackTempFileChangesAsync = function(doc, folder, file) {
        var queryOptions;
        queryOptions = new Windows.Storage.Search.QueryOptions();
        queryOptions.userSearchFilter = "System.FileName:=\"" + file.name + "\"";
        fileQueryResults[doc.id] = folder.createFileQueryWithOptions(queryOptions);
        return fileQueryResults[doc.id].getFilesAsync().then(function(files) {
          return fileQueryResults[doc.id].addEventListener('contentschanged', function(event) {
            return updateAsync(doc, file);
          });
        });
      };
    
    It watches changes on a particular file. The interesting part is: When I browse to the files location using Explorer the contentschanged listener is triggered. What does Explorer do to cause this? Does it change the "last access" of the file? When opening the file with another program the listener is not triggered (until the file is saved by the other program)

    Thursday, November 22, 2012 10:02 AM