How to use the File System Events API in Swift?

余生长醉 提交于 2019-12-12 16:04:41

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!