0

I am trying to monitor file changes, as well as identify the application that performed them, on OSX. NSWorkspace provides the NSWorkspaceDidPerformFileOperationNotification event, which is perfect for my needs, but it is deprecated in OSX 10.11 with no suggested replacement in the docs. Is there a direct replacement available?

I am aware of FSEvents streams, but for this particular use case the above seems to have a much simpler usage pattern. As far as I currently understand it, fsevent monitoring at the root level is expensive, and monitoring file changes requires explicit caching of directory listings.

benvan
  • 49
  • 3
  • `NSWorkspaceDidPerformFileOperationNotification` never informed your app about file operations performed by other apps. From the docs you linked (emphasis added): "Posted when a file operation has been performed **in the receiving app**." It is only posted when your app uses `-performFileOperation:source:destination:files:tag:`, not even for general file operations. – Ken Thomases Jun 20 '16 at 19:51
  • Ah.. Oh dear. My apologies - I should have realised. Thanks for the info - I will pursue fsevents. Not sure on the etiquette here - I assume I leave this question be, for posterity? – benvan Jun 20 '16 at 20:27

0 Answers0