2

I need to monitor the content of the Documents folder for new content. I see that on OSX there is a File Systems Events API. What about iOS? How could I do this?

woz
  • 10,888
  • 3
  • 34
  • 64
Soch S.
  • 653
  • 6
  • 23
  • Duplicate http://stackoverflow.com/questions/2972563/what-is-the-optimal-way-to-monitor-changes-in-a-directory-with-a-kqueue – Björn Kaiser Jan 18 '11 at 17:01
  • Indeed. Thanks! Also: http://stackoverflow.com/questions/3181821/notification-of-changes-to-the-iphones-documents-directory – Soch S. Jan 18 '11 at 17:30
  • Possible duplicate of [What is the optimal way to monitor changes in a directory with a kqueue()?](https://stackoverflow.com/questions/2972563/what-is-the-optimal-way-to-monitor-changes-in-a-directory-with-a-kqueue) – Rivera Sep 14 '18 at 13:43

1 Answers1

0

Just implemented this

README:

FileSystemEventPublisher

A publisher that tracks changes in the file system.

Example usage:

let cancellable = DispatchSource.publish(
  .all,
  for: FileManager.default.temporaryDirectory
)
.receive(on: RunLoop.main)
.sink { event in
  print(event)
}
//.
//.
//.
cancellable.cancel()