eonist / FileWatcher

Monitoring file system changes in macOS
MIT License
209 stars 13 forks source link

Would this syntax be possible/feasible? #1

Closed eonist closed 7 years ago

eonist commented 7 years ago
let fileWatcher = FileWatcher("url"){ 
    ...
}
paperlib commented 7 years ago

Was kind of leaving that as "nice to have" for later... but since you make it an issue :-) thought I might just commit a small extension for this right away

eonist commented 7 years ago

Yeh definitely nice to have for later. Left it as an Issue. Maybe someone knew how to pull it of.

paperlib commented 7 years ago

not for later .. you can now use the above syntax - say I had this in my tests:

let filewatcher = FileWatcher([NSString(string: "~/Desktop").expandingTildeInPath]) { event in
  print("Something different happened here: " + event.description)
}

:-)))

eonist commented 7 years ago

Awesome. 🎉