FigBug / Gin

A few extras for juce
BSD 3-Clause "New" or "Revised" License
262 stars 40 forks source link

FileSystemWatcher: add a removeAllFolders() method #3

Closed yfede closed 6 years ago

yfede commented 6 years ago

More a feature request really.

Use case:

I have a list in my GUI showing the files in a folder. Said list gets updated when the FileSystemWatcher says something has changed. The user can press a "browse" a button to change which folder has its content listed. When the folder to display changes, I must tell the FileSystemWatcher to stop watching the old folder and watch the new one. This implies that at that moment I must have a track of what the old folder was to call removeFolder(), while what I really would like to do is tell the watcher: "forget whatever folder you were watching before", and then call addFolder(newFolder) to watch the new one

FigBug commented 6 years ago

Added FileSystemWatcher::removeAllFolders()