• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: get version information
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Prev by Date: Re: nspopupbutton action selections
  • Next by Date: Toolbar problems
  • Previous by thread: get version information
  • Next by thread: Newbie simple question - Get Time
  • Index(es):
    • Date
    • Thread