Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!wuarchive!gem.mps.ohio-state.edu!uakari.primate.wisc.edu!dogie.macc.wisc.edu!gatech!udel!rochester!pt.cs.cmu.edu!g.gp.cs.cmu.edu!fryd From: fryd@g.gp.cs.cmu.edu (Michael Fryd) Newsgroups: comp.sys.mac.programmer Subject: Getting the full pathname? Message-ID: <6464@pt.cs.cmu.edu> Date: 9 Oct 89 20:39:00 GMT Organization: Carnegie-Mellon University, CS/RI Lines: 33 I am in the process of getting Scribe to run under MPW on the Mac. One of the problems I am trying to solve is how to get the full pathname from a user specified partial pathname that starts with multiple ':'s? The syntax "::folderb:filename" is like the Unix "../folderb/filename", it means go up one level from the current directory, and then get filename from folderb. The standard solutions that have been posted all work in the normal case of the user specifying a simple filename of the form "filename" or ":subfolder1:subfolder2:filename", but they give strange results when the user tries "::folderb:filename". The file manager understands this syntax. If the default directory is "HD:foldera" then a filename of "::folderb:filename" correctly gets the file "HD:folderb:filename", however all of the standard routines for getting the full pathname return "HD:foldera::folderb:filename". Although "HD:foldera::folderb:filename" is a correct path to the file, I would like to supply the more compact "HD:Folderb:filename". Is there any way to get the real filename and directory name for an open file? I would like to avoid trying to parse the filename myself, If I can get the Mac to tell me where the file is, Scribe will have a better chance of working when system 7 comes out. Thanks Michael Fryd (412) 751-5557 MEFCO, Inc. Fax: (412) 751-8403 2401 Coulter Road Arpa: Michael.Fryd@cs.cmu.edu McKeesport, PA 15131-4251