Re: advice on background process
Re: advice on background process
- Subject: Re: advice on background process
- From: Jerry Krinock <email@hidden>
- Date: Thu, 18 Jun 2009 14:23:55 -0700
On 2009 Jun 18, at 06:42, Rick C. wrote:
thanks again. yes after reviewing everything that would seem to be
the best way to go for me. am i on the right track thinking i could
write a foundation tool maybe using fsevents to screen the changes
of a directory and then if necessary pass along the info and/or
launch my main app? if so i'll probably go that route.
I can't answer this for sure without knowing exactly what kind of
"change" your looking for.
But I don't believe you need FSEvents. FSEvents notifies you when
something has changed. launchd launches your tool when something has
changed. You see, they do the same thing. I would suspect that
launchd uses FSEvents under the hood.
Knowing that there has been "a change", your tool will use
NSFileManager methods to determine what is in the subject directory
now, and if necessary, compare it with a record you have stored
somewhere of what was in the subject directory previously. This
record can be stored in User Defaults, a file in Application Support,
etc.
_______________________________________________
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