Re: programmatically tell when spotlight/mds is indexing
Re: programmatically tell when spotlight/mds is indexing
- Subject: Re: programmatically tell when spotlight/mds is indexing
- From: Jerome Krinock <email@hidden>
- Date: Sat, 18 Mar 2017 09:05:02 -0700
To generalize your question, you want to reverse-engineer some other app to reveal some status information. I’ve had to do this a couple times.
Watch in Activity Monitor and see if there is any transient process which coincides with the activity you are interested in. If you find one, there may be additional information in its arguments, which you can get from running `ps` in Terminal. You can also use `lsof` to see if certain files are being accessed.
If you do find such a process, your app can run `ps` as a NSTask, triggered by some ad-hoc algorithm which you will cleverly devise to minimize performance hits, particularly if invoking `lsof`. It’s a messy programming task, but since your purpose (warning the user) is kind of mushy, the result may be “good enough”.
_______________________________________________
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