 |
 |
kqueue/kevent and filesystem changes
|
 |
|
 |
|
Mac Elite
Join Date: Aug 2001
Status:
Offline
|
|
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
|
|
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
|
|
FNNotify won't do what he wants.
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Aug 2001
Status:
Offline
|
|
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
|
|
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
|
|
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
|
|
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.
|
| |
|
|
|
 |
 |
|
 |
|
|
|
|
|

|
|
 |
Forum Rules
|
 |
 |
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
 |
 |
 |
 |
|
 |
|