views:

592

answers:

1

Hai all, I am developing an application in cocoa.I want to constantly check whether the contents of a file in a particular location is changed or not (like FileSystemWatcher in .NET).Please anyone give me a solution.I used FSEvent but it monitors only folder for changes...But I need to know whether a file in that folder is changed or not ..Please anyone help me ......

A: 

When you get an FSEvent for the folder containing your file, check your file's mod date to see if it's the one that changed. FSEvent doesn't offer finer granularity than that.