Without knowing what you mean by "respond to", it's impossible to say what might be "best". If you have a specific action in mind, you'll have to say what that specific action is.
Try it. See what happens. Post the results.
In the absence of any information about what you're trying to accomplish, NSWorkspace seems like a good starting point to me. If you have specific reasons to think otherwise, or have encountered a specific problem, you'll have to post the reasons or the problems.