How do I know what actually changed when StorageFolderQueryResult.ContentsChanged is called?


  • The detail of the event is conveniently empty :( So the only way to figure out what changed is to parse the folders files again. Considering that Bulk Access is synchronous (contrary to what the API says), this can be a lot of pain.

    As an alternative I wonder if the FindFirstChangeNotification APIs are avail for WinRT components to roll my native folder watcher.

    Thursday, November 1, 2012 2:43 PM

All replies

  • Hi phil_ke,

    The current ContentChanged event doesn't directly provide the detailed changed information. Through VS debugger, you can inspect the event argument passed in the handler, it will have a "target" property which points to the source folder(trigger the event). So, that's the point where we need to call the certain query API again to check updates. Here is a former threads discussing on the same topic:

    #Picture folder Monitor API in metro app

    Please remember to mark the replies as answers if they help and unmark them if they provide no help. Putting communities in your palms. Launch the browser on your phone now, type aka.ms/msforums and get connected!

    Friday, November 2, 2012 3:11 AM
  • Unfortunately the thread you pointed me to does not solve the "what was changed" issue. The API MS provided here is basically useless. Unless you want to scan the folders again and again and diff what has changed.
    Tuesday, November 6, 2012 9:22 AM