How to read /dev/fsevents in Lion & Mountain Lion
How to read /dev/fsevents in Lion & Mountain Lion
- Subject: How to read /dev/fsevents in Lion & Mountain Lion
- From: Mathu kannan <email@hidden>
- Date: Fri, 21 Sep 2012 22:13:35 +0530
Hi,
I'm
developing an Application in Mac which requires File System
Notifications. I have checked on FSEvents API but it gives notifications
only on Directory Level and my application may meet sub directories
which may have 100K files or more. So i cannot easily check which file
is modified.So i thought to read directly from /dev/fsevents.
The code works perfectly on Leopard & SnowLeopard, but in Lion & Mountain Lion , it doesn't.
/* ########################################################### */
fca.event_list = (int8_t *)event_list;
fca.num_events = sizeof(event_list)/sizeof(int8_t);
fca.event_queue_depth = EVENT_QUEUE_SIZE;
fca.fd = &clonefd;
if ((ret = ioctl(fd, FSEVENTS_CLONE, (char *)&fca)) < 0) {
perror("ioctl");
close(fd);
exit(1);
}/* ########################################################### */
And i tried reading directly from using read for /dev/fsvents in Mountaion Lion. That didn't worked either.
Please suggest me a way to read from /dev/fsevents in Lion & Mountain Lion with Cloning of /dev/fsevents.
Regards,
Mathu
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden