eonist / FileWatcher

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

FileWatcherEvent properties should be public? #13

Closed UksusoFF closed 5 years ago

UksusoFF commented 5 years ago

If we need check that file created:

import FileWatcher_macOS
let filewatcher = FileWatcher([
  NSString(string: "~/Desktop").expandingTildeInPath
])

filewatcher.callback = { event in
  if (event.fileCreated) {
    print("File created here: " + event.path)
  }
}

filewatcher.start()

We got: 'fileCreated' is inaccessible due to 'internal' protection level

eonist commented 5 years ago

Aha. Probably a mistake. Permission to PR it 😊