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

    Question

  • 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 01, 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
    http://social.msdn.microsoft.com/Forums/sv-FI/winappswithcsharp/thread/7934ba5a-f1fd-445d-9f3b-0012801fe0f4


    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 02, 2012 3:11 AM
    Moderator
  • 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 06, 2012 9:22 AM