🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.mac
Article #14535

Conversion WDRefNum+file name -> full path name?

#14535
From: Gernot Heiser
Date: Fri, 23 Jan 1987 19:20
26 lines
2089 bytes
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
Technical Details
Message-ID: <436@ethz.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!mnetor!seismo!mcvax!cernvax!ethz!gridfile

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: arc1-ca.pugleaf.net!utzoo!mnetor!seismo!mcvax!cernvax!ethz!gridfile
From: gridfile@ethz.UUCP (Gernot Heiser)
Newsgroups: comp.sys.mac
Subject: Conversion WDRefNum+file name -> full path name?
Message-ID: <436@ethz.UUCP>
Date: Fri, 23-Jan-87 14:20:28 EST
Article-I.D.: ethz.436
Posted: Fri Jan 23 14:20:28 1987
Date-Received: Sat, 24-Jan-87 00:47:05 EST
Reply-To: gridfile@ethz.UUCP (Gernot Heiser)
Organization: CS Department, ETH Zuerich, Switzerland
Lines: 26