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 Thursday, May 15, 2003, at 01:13 AM, Mamta Choudhary wrote:

Hi,
I'm totally new to MAC OS so please bear with my stupid question. But I
really need help. Actually I'm trying to create a file for which I need to
create a FSSpec. I'm useing the function FSMakeFSSpec. In carbon
documentaiton it is specified that you must pass a valid directory id and
volume id in FSMakeFSSpec. But I could not find a function which gives me
the dirID by giving the path. Please help

Where do you to want to put this file?

There are APIs to get an FSSpec for "special" folders like Preferences, etc.

And there are APIs to the the FSSpec of your application or its bundle.

Using these APIs it's trivial then to combine that with a specific file name to get an FSSpec to some location you know ahead of time.

If you are new to the Mac you should probably read up on as much of the APIs as you can. One quick start might be here...hmm, can't get to MacTech's server. But MacTech has a carbon tutorial that you might be able to get to at http://www.mactech.com/macintosh-c/

And lastly, be sure to really browse the headers. That is where a LOT of documentation is. Most of the HIToolbox (window, control, carbon events, menus, etc.) and others like Files should be read start to finish at least once.

Also, one of my more favorite links: http://www.catb.org/~esr/faqs/smart-questions.html

Bryan
_______________________________________________
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: 
 >How to get DirID (From: Mamta Choudhary <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.