Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!usc!apple!claris!jazzman From: jazzman@claris.com (Sydney R. Polk) Newsgroups: comp.sys.apple Subject: Re: new standard file questions Message-ID: <10706@claris.com> Date: 30 Nov 89 17:50:22 GMT References: <14385@boulder.Colorado.EDU> Organization: Claris Corporation, Santa Clara CA Lines: 56 From article <14385@boulder.Colorado.EDU>, by hartkopf@tramp.Colorado.EDU (Jeff Hartkopf): > I posted this question several days ago but received no replies to it, so > I assume something went wrong, and I'm posting it again: > ------------------- > > Question about the new Standard File calls and the SFReplyRec2 > record: > > What is the format of the nameDesc and pathDesc fields of an SFReplyRec2 > after calling SFGetFile2()? I assumed they were Pascal-type strings as > in the SFReplyRec, but I seem to be wrong. > > Thanks a lot for any help. > > > Jeff Hartkopf > > Internet: > hartkopf@tramp.Colorado.EDU Well, I thought somebody from Apple would answer this, but I guess not. It depends on a couple of values. There is a field labeled "pathVerb". You have to supply a value. Depending on what this value is, the "pathDesc" field will be one of the following: - a pointer to a Class 1 GS/OS string. You have to supply the pointer. - a handle to a Class 1 GS/OS string. You have to supply the handle. - a handle to a Class 1 GS/OS string. Standard File allocates it, you have to throw it away. The format of the GS/OS string is as follows: - A length word indicating how much space this is taking up. - A length word indicating how big the pathname is. - The pathname. I would let Standard File allocate the handle. If you are on an AppleShare volum, it could get quite large. (HFS doesn't have any 64-byte partial pathname limitations or 128 full pathname limitations). Look, I don't mean this personally, but I see you asking lots of questions that are answered in the Toolbox Manuals. Do you ever read them? The Standard File stuff is painstakingly clear (I know, I caused one of the sections of documentation to be written!) if you read it and you have a knowledge of GS/OS. I have also seen questions on other tools that could be figured out from the manuals. What I am trying to say is, it is worth investing the time to look up the answers to questions in the Toolbox Manuals. If you can't find it, THEN ask the net. Sorry to get on my soapbox, -- Syd Polk | Wherever you go, there you are. jazzman@claris.com | Let the music be your light. GO 'STROS! | These opinions are mine. Any resemblence to other GO RICE! | opinions, real or fictitious, is purely coincidence.