🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: net.micro.mac
Article #6028

Re: Directory name from DirID?

#6028
From: Eric Olson
Date: Fri, 13 Jun 1986 15:13
19 lines
1490 bytes
In article <157@zyx.UUCP> grzm@zyx.UUCP (Gunnar Blomberg) writes:
>
>	Is there a way to get the directory name from the directory id,
>without searching through the directory tree or going to disk yourself?
>If so, how is it done?

I believe there are not any system calls that will do this for you.
I had to do this, and ended up using the recursive hierarchical search-
all-files described in Apple Tech Note 68.  Note that you must check
the directory bit, and IF IT IS SET, ioDrDirID will be the directory ID
(which you match against) and ioNamePtr will be the name.  If the directory
bit is not set, ioDrDirID will be a File Number.  In either case, you MUST
reset ioDrDirID to the directory you are searching, since it is modified
by the call to reflect the file number of dirID of a directory.

The other alternative is to search the Catalog Tree file, but its format
is very hairy and subject to change.

-Eric
Technical Details
Message-ID: <17@harvard.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!linus!axiom!drilex!rclex!harvard!olson
References: <157@zyx.UUCP>

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: arc1-ca.pugleaf.net!utzoo!linus!axiom!drilex!rclex!harvard!olson
From: olson@endor.harvard.edu (Eric Olson)
Newsgroups: net.micro.mac
Subject: Re: Directory name from DirID?
Message-ID: <17@harvard.UUCP>
Date: Fri, 13-Jun-86 11:13:52 EDT
Article-I.D.: harvard.17
Posted: Fri Jun 13 11:13:52 1986
Date-Received: Sat, 14-Jun-86 06:20:36 EDT
References: <157@zyx.UUCP>
Sender: news@harvard.UUCP
Reply-To: olson@endor.UUCP (Eric Olson)
Organization: Aiken Comp Lab, Harvard
Lines: 19
Keywords: HFS