From mboxrd@z Thu Jan 1 00:00:00 1970 From: smiley@zenzebra.mv.com To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> References: <201102031245.33842.dexen.devries@gmail.com> <201102031444.40895.dexen.devries@gmail.com> <201102031527.59587.dexen.devries@gmail.com> Date: Thu, 3 Feb 2011 18:42:39 +0000 In-Reply-To: <201102031527.59587.dexen.devries@gmail.com> (dexen deVries's message of "Thu, 3 Feb 2011 15:27:59 +0100") Message-ID: <86aaidkli8.fsf@cmarib.ramside> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [9fans] files vs. directories Topicbox-Message-UUID: ab23721c-ead6-11e9-9d60-3106f5b1d025 dexen deVries writes: >> oh yes, maintaining the usual semantics for cp becomes tricky. >> >> mkdir z >> cp x.c z >> >> do i mean to write x.c to z itself, or to a new file within z? > > nb., with the current semantics you *could* say `cp x.c z/' to be unambiguous > you want to create a child of `z', but it seems to be common not to use > trailing slash unless 100% necessary. dexen hits the nail on the head right there... files and directories could be contextually distinguished from each other by always specifying the directory name with a trailing "/". "foo.c/" means the directory foo.c/. "foo.c" means the file ./foo.c There's no way that I know of to possibly interperet a path ending in "/" as a file (with the exception of reading raw Dir data, as on Plan 9 or "cat /" on, what was it, Solaris?). -- +---------------------------------------------------------------+ |E-Mail: smiley@zenzebra.mv.com PGP key ID: BC549F8B| |Fingerprint: 9329 DB4A 30F5 6EDA D2BA 3489 DAB7 555A BC54 9F8B| +---------------------------------------------------------------+