FSEvent- FSEventStreamEventFlags
FSEvent- FSEventStreamEventFlags
- Subject: FSEvent- FSEventStreamEventFlags
- From: santoshb <email@hidden>
- Date: Thu, 12 Jun 2008 18:27:33 +0530
Hi All,
I want to know how we can get the file close event using
FSEventStreamEventFlags.
I have written the code for get the event when user write, open and
close the file. But we are not able to distinguish between which event
is for which purpose.
Shown below is the out put of function call --
FSEventStreamShow(streamRef);
FSEventStreamRef @ 0x101f10:
allocator = 0xa01ea1a0
callback = 0x1c20
context = {0, 0x2034, 0x0, 0x0, 0x0}
numPathsToWatch = 1
pathsToWatch = 0xa01ea1a0
pathsToWatch[0] = '/private/tmp'
latestEventId = 49124
latency = 1000000 (microseconds)
flags = 0x00000000
in this always flags is NULL for all event in that directory specified,
only the latestEventId changes for every event.
So how can i find out whether file was opened, closed or write
operation was performed on the file.
Here is the code snippet for creating stream.
FSEventStreamCreate(kCFAllocatorDefault,
&mycallback,
&context,
pathsToWatch,
kFSEventStreamEventIdSinceNow,
latency,
kFSEventStreamCreateFlagNone /* Flags explained in reference */
);
where as pathsToWatch="/tmp/",
latency=3.0,
mycallback=is the callback function.
Is something i am missing
Please suggest.
Thanks,
Santosh
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden