dexen deVries <dexen.devr...@gmail.com> 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: smi...@zenzebra.mv.com             PGP key ID: BC549F8B|
|Fingerprint: 9329 DB4A 30F5 6EDA D2BA  3489 DAB7 555A BC54 9F8B|
+---------------------------------------------------------------+

Reply via email to