- Subject: Re: dircat vs. path_concat
- From: "John E. Davis" <davis@xxxxxxxxxxxxx>
- Date: Thu, 16 Oct 2003 01:18:36 -0400
Klaus Schmid <klaus.schmid@xxxxxxx> wrote:
>> Joerg Sommer <joerg@xxxxxxxxxxxx> wrote:
[...]
>> I don't know the syntax of VMS paths and I don't know what is valid, but
>> dircat("d:foo.bar", "") brings "d:foo.bar]"
As I recall, d:foo.bar is not a valid VMS directory name.
>For dircat I think a few syntax rules are sufficient.
>Very roughly:
>x:a + b --> undefined
Unless a is "" and x is, e.g., sys$login. sys$login:b refers to
the file in the "home" directory. Also, one might want to concatenate
x:a.dir + b to form x:[a]b, or possibly x:[a]b.dir if b is a directory.
[...]
>I think dircat works (or should work) the same way as path_concat.
>An obvious difference is the expand_filename() at the end of dircat;
>I don't know why this was introduced into dircat.
It was introduced so that the result would be a full pathname. Again,
dircat is an old function and some uses of it may have depended upon a
full pathname.
[...]
>Then two basic functions to navigate through the directory tree,
>realized os-type-dependant:
>(d,b)= dir_up( dir)
>dir= dir_down( d,b)
>
>e.g.:
>split_file( "a:[b]c.txt") --> "a:[b]", "c.txt"
>dir_down( "a:[b]", "c.dir") --> "a:[b.c]"
>dir_up( "a:[b.c]") --> "a:[b]", "c.dir"
I think you mean split_file for the last example.
>One UNIX-detail I am almost sure cannot be transposed to VMS:
>"a" == "a/." == "a/b/.."
I think you can use [] to mean . on VMS, e.g., ./a == []a. Also,
dev$device:[a.b.-] is equivalent to device$device:[a]. I forget what
dev$device:[a.b...] means. Also it is important to note that on Unix,
"a/b/.." _may_ not be equivalent to "a".
Finally, to make things even more interesting on the VMS side,
dev$device does not have to represent a single device. Instead,
dev$device could represent a search list, i.e., a set of directories
to be tried in succession. Another way of looking at it,
dev$device:[a]b.txt;3 (VMS has versions--- ";3" means third one), may
not uniquely specify a file.
Thanks,
--John
--------------------------
To unsubscribe send email to <jed-users-request@xxxxxxxxxxx> with
the word "unsubscribe" in the message body.
Need help? Email <jed-users-owner@xxxxxxxxxxx>.
[2003 date index]
[2003 thread index]
[Thread Prev] [Thread Next]
[Date Prev] [Date Next]