Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GTMFileSystemKQueue information and recursion #88

Closed
GoogleCodeExporter opened this issue Apr 21, 2015 · 1 comment
Closed

GTMFileSystemKQueue information and recursion #88

GoogleCodeExporter opened this issue Apr 21, 2015 · 1 comment

Comments

@GoogleCodeExporter
Copy link

I'm using the GTMFileSystemKQueue class to implement a file system watcher for 
Mac, like I have on Windows.  I added this function to the GTMFileSystemKQueue 
class and use it as my callback:
[code]+ (void)callbackForQueue:(GTMFileSystemKQueue *)queue
                  events:(GTMFileSystemKQueueEvents)event
{
     NSLog(@"%@ changed", queue.path);
}[/code]

It works, but there are two limitations:
1.  It only prints out that the directory changed.  It doesn't tell me which 
file changed, or whether it was created, modified, or deleted.

2.  It does not work recursively.  Changes to files in folders below the 
directory passed to InitWithPath have no effect.

How can I make this code act recursively and provide the precise information I 
need?  Thank you.

Mac Developer forum thread here:
https://devforums.apple.com/thread/171514

Original issue reported on code.google.com by joshkl...@me.com on 26 Oct 2012 at 11:18

@GoogleCodeExporter
Copy link
Author

This is just a wrapper for kevent: 
https://developer.apple.com/library/mac/#documentation/Darwin/Reference/ManPages
/man2/kevent.2.html

kevent is for watch a path, not a directory tree.

The system provided FSEventStream apis is probably closer to what you want.

Original comment by thomasvl@google.com on 27 Oct 2012 at 6:38

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants