-
Notifications
You must be signed in to change notification settings - Fork 13
Home
Eon edited this page Apr 19, 2018
·
10 revisions
let fileWatcher = FileWatcher(["~/Desktop/test/".tildePath])
fileWatcher!.callback = { /*[weak self]*/ event in//<--The weak self part enables you to interact with your app in a safe manner, not required
Swift.print(self?.someVariable)//Outputs: a variable in your current class
Swift.print(event.description)//Outputs: a description of the file change
}
filewatcher.start() // start monitoring
https://github.com/eonist/FileWatcher/wiki/LiveEdit
- Better structure ✅
- More swift like ✅
- More CI bots 🤖
- enum event types
- Ability to Alter WatchList on the fly
- More code examples
- Support for running FileWatcher on. background thread