How to check if a directory is bundle

http://developer.apple.com/technotes/tn2002/tn2078.html

OSStatus LSIsApplication( const FSRef *inRef, Boolean *outIsApplication,
Boolean *outIsBundled )
{
LSItemInfoRecord info;
OSStatus err = LSCopyItemInfoForRef( inRef, kLSRequestBasicFlagsOnly,
&info );

if ( err == noErr )
{
*outIsApplication = ( kLSItemInfoIsApplication &info.flags ) != 0;
*outIsBundled = ( kLSItemInfoIsPackage &info.flags ) != 0;
}
return( err );
}

Blogged with Flock

Tags:

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: