问题
maybe my search terms are not good today, but i can't find a simple example how to use the FSEvents in swift.
I have a cocoa application that displays contents from a file. When the file is changed outside of my application i have to mark the reload-button in another color. I thing FSEvents is the right place to look for this, or should I use another API?
Can you give me an example of how to revive an event when a file has changed the content?
Thank you very much.
回答1:
After looking again I found this little Library, that works on files, too: https://github.com/Eonil/FileSystemEvents
来源:https://stackoverflow.com/questions/29048348/how-to-use-the-file-system-events-api-in-swift