[comp.sys.mac] Conversion WDRefNum+file name -> full path name?

gridfile@ethz.UUCP (Gernot Heiser) (01/23/87)

While  implementing  the  Modula-2  Standard  Interface  OSSI  on  the  Mac  I
encountered the problem of  constructing the  full path  name of  a file whose
name and WDRefNum were  returned by  SFGetFile.   Calling PBGetCatInfo returns
the  name  and  DirID  of the  subdirectory containing  the file.   This DirID
apparently can't be used for  further calls  to PBGetCatInfo,  contrary to the
File  Manager  manual:    "If  both  a  directory  ID and  a working directory
reference  number  are  specified, the  directory ID  is used  to identify the
directory on the volume indicated by  the working  directory reference number.
In  other  words, a  directory ID  specified by  the caller  will override the
directory  referred  to by  the working  directory reference  number."  (Alpha
Draft p.  17) 

My  question  is:    Does  anybody know  a way  to find  the working directory
reference number given the directory  ID?   Or, better:   Does  anybody know a
better way to find a file's full path name?

Probably some will say, the usage of full path names should be  avoided in the
first place.  However, in a system independent  interface to  files, files can
only  be  identified  by  names,  and  hence  I'm  forced  to use  them.  (The
interactive user won't see any of that though.)

Please respond via e-mail. Thanks.
-- 
Gernot Heiser, Inst. f. Informatik, ETH Zuerich, 8051 Zuerich, Switzerland
Phone: 01/256 23 49                 Uucp:   {seismo,...}!mcvax!ethz!heiser
                                    Bitnet: GRIDFILE@CZHETH5A