Re: get version information
Re: get version information
- Subject: Re: get version information
- From: Lloyd Dupont <email@hidden>
- Date: Thu, 10 Apr 2003 09:04:25 +1000
looks great, thanks !
On Wednesday, April 9, 2003, at 07:21 PM, Jonathan Guy wrote:
>
Hi
>
This should hopefully give you what you want.
>
>
- (NSString *)versionAtPath:(NSString *)path
>
{
>
short fileReference;
>
FSRef theFsRef;
>
VersRecHndl version;
>
if (FSPathMakeRef([path UTF8String], &theFsRef, nil) == noErr) {
>
fileReference = FSOpenResFile (&theFsRef, fsRdPerm);
>
if (fileReference > 0) {
>
version = (VersRecHndl) GetResource('vers', 1);
>
if(version && noErr == ResError())
>
{
>
return [NSString
>
stringWithCString:&(**version).shortVersion[1]
>
length:((**version).shortVersion[0])];
>
}
>
}
>
}
>
return nil;
>
}
>
>
Jonathan Guy
_______________________________________________
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.