🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.unix
Article #479

Re: Some thoughts on filenames - "" in particular

#479
From: Dave Cornutt
Date: Tue, 24 Nov 1987 18:19
32 lines
2413 bytes
I know this is beating a dead horse, and probably everyone is sick of this
subject by now, and I promise to make this my last posting on this topic.

The real problem with "" as a file name, as several folks have already
pointed out, is that depending on what context you use it in, it can
refer either to the current directory or to the root directory; if you
use it as a filename by itself, it's the current directory, but it
you construct a filename by appending "/foo" to it, you're referring
to a file in the root.  The cure is to give root a name, just like
every other directory.  For example, let "$" be the name of the root.
This is a "magic" name; when namei sees "$" by itself in any component
of a pathname, it refers to the root, so file "xyz" on the root directory
is not "/xyz" but "$/xyz".  Then, you can let any null filename mean the
current directory; since root has a non-null name, you can append paths
to it and have it work.  So, "/xyz" now refers to "<null>/xyz", and
since the null path is the current directory, "/xyz" refers to xyz
in the current directory.  Now, you can append paths to the null
path and have it refer to files in the current directory, just like
every other directory name works.

Does this make any sense, or is it too much like VMS?
---
"You must be joking, take a running jump" - *Harold the Barrel*

Dave Cornutt, Gould Computer Systems, Ft. Lauderdale, FL
[Ignore header, mail to these addresses]
UUCP:  ...!{sun,pur-ee,brl-bmd,uunet,bcopen,rb-dc1}!gould!dcornutt
 or ...!{ucf-cs,allegra,codas,hcx1}!novavax!gould!dcornutt
ARPA: dcornutt@gswd-vms.arpa

"The opinions expressed herein are not necessarily those of my employer,
not necessarily mine, and probably not necessary."
Technical Details
Message-ID: <2597@mcdchg.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!mnetor!uunet!husc6!cmcl2!rutgers!super.upenn.edu!eecae!upba!mcdchg!usenet
References: <3844@elecvax.eecs.unsw.oz>

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!uunet!husc6!cmcl2!rutgers!super.upenn.edu!eecae!upba!mcdchg!usenet
From: dave@murphy.UUCP (Dave Cornutt)
Newsgroups: comp.unix
Subject: Re: Some thoughts on filenames - "" in particular
Message-ID: <2597@mcdchg.UUCP>
Date: Tue, 24-Nov-87 13:19:40 EST
Article-I.D.: mcdchg.2597
Posted: Tue Nov 24 13:19:40 1987
Date-Received: Sat, 28-Nov-87 18:14:49 EST
References: <3844@elecvax.eecs.unsw.oz>
Sender: usenet@mcdchg.UUCP
Organization: Gould CSD, Fort Lauderdale, FL
Lines: 32
Approved: usenet@mcdchg.UUCP
Summary: To really do it right, root needs to have a name