Peter Shaw
Peter Shaw

Reputation: 1907

How to use the File System Events API in Swift?

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.

Upvotes: 4

Views: 3480

Answers (1)

Peter Shaw
Peter Shaw

Reputation: 1907

After looking again I found this little Library, that works on files, too: https://github.com/Eonil/FileSystemEvents

Upvotes: 4

Related Questions