Path: utzoo!mnetor!uunet!mcvax!guido From: guido@cwi.nl (Guido van Rossum) Newsgroups: comp.sys.mac.programmer Subject: Re: Full path name of a file Message-ID: <309@piring.cwi.nl> Date: 9 May 88 22:23:10 GMT References: <2532@chalmers.UUCP> <301@piring.cwi.nl> <304@piring.cwi.nl> <6464@cit-vax.Caltech.Edu> Reply-To: guido@cwi.nl (Guido van Rossum) Organization: The Royal Society for Prevention of Cruelty to Amoebae Lines: 26 In article <6464@cit-vax.Caltech.Edu> wetter@tybalt.caltech.edu.UUCP (Pierce T. Wetter) writes: >[replying to what I wrote about full path names >255 bytes:] > I'm assuming you have some special file your application needs to look at >which for some reason you don't want to save with your application in the >data fork. You want this file to be located somewhere other then the same >folder as the application or the system folder. >[tricks how to do it right omitted] In fact I was just replying to somebody asking "how do I compute the full path name of a file?". God knows why they need it. I know several programs which put the full path name of a file in the window title when editing it (however they usually replace the middle with "..." if it becomes too large). Personally, I use the code because I am porting non-Mac programs to the Mac; these programs ask the user for a file name and then open it using fopen(3). I replace the piece of code that asks for a file name with a routine call which uses SF{Get,Put}File and converts the file found to an absolute path name. I can't return the relative path name and set the default directory because the program will remember the file name for a very long time. -- Guido van Rossum, Centre for Mathematics and Computer Science (CWI), Amsterdam guido@piring.cwi.nl or mcvax!piring!guido or guido%piring.cwi.nl@uunet.uu.net