🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.utils.bug
Article #677

more thoughts on fileutils

#677
From: Michael I Bushnell
Date: Fri, 28 Aug 1992 12:57
35 lines
1799 bytes
There is another, even more important reason for not having the
fileutils be overly clever.

In GNU, nodes can be both directories and ordinary files.  (This is a
*possibility* for filesystems; it will not be thus for ufs
filesystems, but it will be thus for other kinds of filesystems in the
initial release.)

The interpretation of such a node is based on context.  When it is
used as a directory, it is a directory.  When used as a file, it is a
file.  Typically, filesystems which permet this are not disk based,
and the contents of the directory tree under such a node is also
present elsewhere on the system.  Suppose "foo" is such a node.  In
that case "mv bar foo" should delete the existing foo (and the virtual
hierarchy underneath it), replacing it with bar.  "mv bar foo/" should
move bar into the directory foo, giving it the name foo/bar, and
leaving the rest of the virtual hierarchy under foo untouched.

To summarize, there are the following possibilities:

Command used->    	    mv bar foo	 		mv bar foo/
Type of foo
    |
    v
ordinary file		    replace foo with bar	generate error

just a directory	    replace foo/bar with bar	ditto

both dir and file	    replace foo with bar	replace foo/bar
							with bar

Filename completion will need to be wise to this possibility in the
Hurd, and, when it is, the fileutils need to be "unclever".

	-mib
Technical Details
Message-ID: <9208282057.AA12744@wookumz.gnu.ai.mit.edu>
Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!gnu.ai.mit.edu!mib

Show Full Headers
Complete Article Headers
Newsgroups: gnu.utils.bug
Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!gnu.ai.mit.edu!mib
From: mib@gnu.ai.mit.edu (Michael I Bushnell)
Subject: more thoughts on fileutils
Message-ID: <9208282057.AA12744@wookumz.gnu.ai.mit.edu>
Sender: gnulists@ai.mit.edu
Organization: GNUs Not Usenet
Distribution: gnu
Date: Fri, 28 Aug 1992 12:57:34 GMT
Approved: bug-gnu-utils@prep.ai.mit.edu
Lines: 37