Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > kqueue/kevent and filesystem changes

kqueue/kevent and filesystem changes
Thread Tools
Mac Elite
Join Date: Aug 2001
Status: Offline
Reply With Quote
Aug 19, 2003, 03:12 PM
 
A friend of mine and I are writing a program that needs a fast way of finding out when the filesystem changes (and what changed). The few responses I've gotten on other forums have made me think that the addition of kqueue/kevent support in 10.3 is what I'm looking for. That leaves the questions:
1) How would I use kqueue/kevent to get filesystem changed notifications
2) Is there any pre-10.3 method for doing this (not a big deal, but nice to know if there is)
     
Mac Elite
Join Date: Sep 2000
Location: Tempe, AZ
Status: Offline
Reply With Quote
Aug 20, 2003, 01:54 AM
 
No clue about the new kernel stuff, but take a look at the FNNotify stuff in Files.h.
Geekspiff - generating spiffdiddlee software since before you began paying attention.
     
Addicted to MacNN
Join Date: Mar 2000
Location: London, UK
Status: Offline
Reply With Quote
Aug 20, 2003, 07:21 AM
 
FNNotify won't do what he wants.
     
Mac Elite
Join Date: Aug 2001
Status: Offline
Reply With Quote
Aug 20, 2003, 12:11 PM
 
Yeah, we saw that one (actually made a little test app for it), but to get what happened, as well as whether something happened, we'd have to subscribe to every directory, then scan the directory if it changed. That's... less than ideal. Also, it only seems to work when the app is in the foreground, which is not so great for an app that runs only in the background. Thanks anyway though, that's the most useful response I've gotten out of 3 forums and an email.
     
Mac Elite
Join Date: Sep 2000
Location: Tempe, AZ
Status: Offline
Reply With Quote
Aug 20, 2003, 01:49 PM
 
Here's some private API stuff.
Geekspiff - generating spiffdiddlee software since before you began paying attention.
     
Addicted to MacNN
Join Date: Mar 2000
Location: London, UK
Status: Offline
Reply With Quote
Aug 20, 2003, 04:38 PM
 
Originally posted by smeger:
Here's some private API stuff.
CPS is basically the underlying framework for the process manager, built into the window manager. I don't see the connection with filesystem notifications
     
Mac Elite
Join Date: Sep 2000
Location: Tempe, AZ
Status: Offline
Reply With Quote
Aug 20, 2003, 06:20 PM
 
Originally posted by Angus_D:
CPS is basically the underlying framework for the process manager, built into the window manager. I don't see the connection with filesystem notifications
Quoting from my link above:


There are already some constants (CPSNotificationCodes) defined in CPS.h related the these notifications, which lets anobody think that some process could be notified for another application's launch start, launch complete, death.... but with far more flexibility than with CarbonEvents.
I've never used this stuff, so I have no clue if this is correct or not. But hopefully, it's helpful.

Heh, I just realized that the original poster wants filesystem notifications, not app launch/quit notifications. I think I need to brush up on my reading skills. Please disregard absolutely everything I've said.
Geekspiff - generating spiffdiddlee software since before you began paying attention.
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 02:19 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2