Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!usc!ucsd!nosc!dog.ee.lbl.gov!csa2.lbl.gov!eastman From: eastman@csa2.lbl.gov (JACK EASTMAN) Newsgroups: comp.sys.mac.programmer Subject: Re: PBGetCatInfo question Message-ID: <7563@dog.ee.lbl.gov> Date: 11 Oct 90 16:41:24 GMT References: <90283.191801CXT105@psuvm.psu.edu> <45563@apple.Apple.COM> Sender: usenet@dog.ee.lbl.gov Reply-To: eastman@csa2.lbl.gov Organization: Lawrence Berkeley Laboratory - Berkeley, CA, USA Lines: 31 X-Local-Date: Thu, 11 Oct 90 09:48:25 PDT News-Software: VAX/VMS VNEWS 1.3-4 In article <45563@apple.Apple.COM>, blob@Apple.COM (Brian Bechtel) writes... >CXT105@psuvm.psu.edu (Christopher Tate) writes: > >>Are indexed calls to PBGetCatInfo() guaranteed to return file/folder >>names in alphabetical position? That is, if I start with 1 and call >>PBGetCatInfo() for every index, one at a time, until I get an error, >>are the names of the folders/files that I've looked at in alphabetical >>order? > >>Or, do I have to alphabetize my list of file/folder names myself, >>after going through the above procedure? > >PBCatInfo() currently returns file/folder names in alphabetical order on >HFS disks. There is no guarantee that this behavior will be true on >disks created by other file systems such as MS-DOS, ISO 9660, High >Sierra, Apple II, etc. which can be read by the Macintosh. > >The behavior may still be there; it just isn't guaranteed. > >--Brian Bechtel blob@apple.com "My opinion, not Apple's" Be careful here to define what you mean by "alphabetical order". I know that indexed calls to _HGetFInfo return files in ASCII order, not the option-blind order used by the Finder; so file names beginning with option-characters will be interposed among non-option-character-named files in the Finder's View by Name, but will come at the end of a list generated by indexed _HGetFInfo. I don't know how _GetCatInfo behaves in this regard. Jack Eastman Berkeley Systems, Inc. eastman@lbl.gov