Re: advice on background process
Re: advice on background process
- Subject: Re: advice on background process
- From: "Rick C." <email@hidden>
- Date: Fri, 19 Jun 2009 07:24:17 -0700 (PDT)
thank you again very much. i do follow you and i was able to put together a basic background process. i still have work to do but seems i'm on the right track. thank you again for the assistance.
rick
________________________________
From: Jerry Krinock <email@hidden>
To: cocoa-dev <email@hidden>
Sent: Friday, June 19, 2009 5:23:55 AM
Subject: Re: advice on background process
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
_______________________________________________
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