Cocoanetics / DTFoundation

Standard toolset classes and categories
BSD 2-Clause "Simplified" License
802 stars 237 forks source link

Using DTFolderMonitor to get changes in directory #98

Closed dominik0711 closed 8 years ago

dominik0711 commented 8 years ago

Hi. Is it possible to retrieve the corresponding action (deleted, added, renamed) and filePath in a monitored folder using DTFolderMonitor? The callback only reports that something has changed. If yes, could you please provide sample code or give me a hint how to implemented such behaviour?

I need the following action:

Thanks in advance

odrobnik commented 8 years ago

The easiest would probably be to implement a class that has a directory listing and then whenever DTFolderMonitor reports that something changed, get a new listing and compare the new and old.