Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.milw.wisc.edu!bionet!agate!ucbvax!dewey.soe.berkeley.edu!oster From: oster@dewey.soe.berkeley.edu (David Phillip Oster) Newsgroups: comp.sys.mac.programmer Subject: Re: list of files Message-ID: <27899@ucbvax.BERKELEY.EDU> Date: 5 Feb 89 02:04:14 GMT References: <6449@hoptoad.uucp> Sender: usenet@ucbvax.BERKELEY.EDU Reply-To: oster@dewey.soe.berkeley.edu.UUCP (David Phillip Oster) Organization: School of Education, UC-Berkeley Lines: 17 In article <6449@hoptoad.uucp> tim@hoptoad.UUCP (Tim Maroney) writes: >do this kind of lasting save, then you'll need, minimally, a volume name >(not reference number, since after you reboot, the volume could be mounted >in a different order or even on a floppy that hasn't been mounted), a >directory id, and a file name. However, there are a few cases where saving >a directory ID won't work, on hypothetical AFP servers, so it's better >to save a full path name. This is right as far as it goes, but under the Macintosh file system, the dirId will still reference the same directory even if you rename the directory. In addition, the file system takes Pascal strings, which are limited to be at most 255 characters long, and path names are allowed to be longer than that. I store the pathname as a C string, and convert it at run time, in pieces if I have to. I also store the triplet, and, in fact I try it first.