Folder Watcher不会始终使用大量文件触发

时间:2016-11-24 19:50:31

标签: uwp filesystemwatcher

当文件夹包含大量图片时,OnContentsChanged不会触发(例如:200)。

QueryOptions folderOptions = new QueryOptions()
                {
                    FolderDepth = FolderDepth.Deep
                };
                folderQuery = windowsFolder.CreateFolderQueryWithOptions(folderOptions);
                folderQuery.ContentsChanged += OnContentsChanged;
                await folderQuery.GetFoldersAsync();

 private void OnContentsChanged(IStorageQueryResultBase sender, object args)
        {
            doSomething();
        }

0 个答案:

没有答案