Re: Finding an App by file id?
Re: Finding an App by file id?
- Subject: Re: Finding an App by file id?
- From: Greg Robbins <email@hidden>
- Date: Sat, 15 Mar 2003 20:32:08 -0800
Is there a way in Cocoa to find an app by its file id?
You mean by its signature; file id means something else on HFS volumes.
Try this to get the FSRef and the CFURL for the application from its
signature using Launch Services:
OSType signature = 'sfri';
FSRef appRef;
NSURL *appURL;
OSStatus err = LSFindApplicationForInfo(signature, NULL, NULL,
&appRef, (CFURLRef*) &appURL);
if (err == noErr)
{
[appURL autorelease];
// examine it with NSLog(@"%@", [appURL absoluteString]);
}
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.