Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to get DirID



on 5/15/2003 6:35 PM, David Duncan at email@hidden wrote:

> On Thursday, May 15, 2003, at 09:05 PM, Everett Sanmann wrote:
>
>> I believe it is valid to pass 0 for the directory id and volume id in
>> FSMakeFSSpec.
>
> You should not pass 0 for the Directory/Volume ID to FSMakeFSSpec. It
> produces different results on MacOS 9 and MacOS X and neither result is
> documented as the correct or expected result. If you want to locate a
> file relative to your application's location, you should instead use
> GetProcessInformation() or one of the appropriate CFBundle APIs.

Actually, 0/0 is relative to the current volume and directory.

Now, 9 and X set the "current volume and directory" differently, so you
should use other means to get "relative to the current application" but 0/0
is a valid vRefNum/dirID pair for FSMakeFSSpec.

--
Glenn L. Austin <><
Computer Wizard and Race Car Driver
<email@hidden>
<http://www.austin-home.com/glenn/>
_______________________________________________
carbon-development mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/carbon-development
Do not post admin requests to the list. They will be ignored.

References: 
 >Re: How to get DirID (From: David Duncan <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.