Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!news.albasani.net!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail From: Eric Sosman Newsgroups: comp.lang.java.programmer Subject: Re: A strange behaviour of a File property Date: Wed, 16 Nov 2011 08:10:01 -0500 Organization: A noiseless patient Spider Lines: 36 Message-ID: References: <5980efbc-9010-4145-b886-fe106c5ac2d5@c18g2000yqj.googlegroups.com> <4ebef267$0$290$14726298@news.sunsite.dk> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Wed, 16 Nov 2011 13:10:04 +0000 (UTC) Injection-Info: mx04.eternal-september.org; posting-host="HSlJAUb3pGXi3i7ZL/HoAw"; logging-data="20549"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+C5yVwbPlYbSev8vKbRi8I" User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:8.0) Gecko/20111105 Thunderbird/8.0 In-Reply-To: Cancel-Lock: sha1:u7OBMTTDRCCxzihlVKc207C7lFY= Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:9973 On 11/16/2011 7:14 AM, Andreas Leitgeb wrote: >[...] > If in a VMS-shell you're curently in directory > data:[a.b.c.d.e.f.g.h.i.j.k.l.m.n]foo.dir > and wanted to access the file > data:[a.b.c.d.e.f.g.h.i.j.k.l.m.n.bar]xyz.txt > would you need to specify the complete path to xyz.txt, or > is there some syntactic pendant to "../bar/xyz.txt" in VMS? Sorry; I don't remember. I *do* remember, though that there is no such thing as being "in" a directory. VMS does not have a Unix-oid notion of "current working directory," but instead has a "default file specification." If you hand the system an incomplete file name, the missing pieces are filled in from the DFS. Thus, the resolution of incomplete names is a lexical operation, not a "navigational" operation. Usually this difference does not obtrude itself upon the user's consciousness, but there are situations where it becomes important. For example, the "data" in your example could be a "logical name" with multiple translations: DISK1:[ANDREAS],DISK2:[READONLY], for example. You could then tell javac to compile DATA:[.SOURCE]FOO.JAVA and DATA:[.SOURCE]BAR.JAVA, and javac would happily find your locally- modified DISK1:[ANDREAS.SOURCE]FOO.JAVA and the still-in-the-repository DISK2:[READONLY.SOURCE]BAR.JAVA. It's something like the way a Unix shell follows the PATH variable, except generalized for all files instead of being limited just to executables. ... but note what this does to the notion of "current directory." DATA:[.SOURCE]FOO.JAVA and DATA:[.SOURCE]BAR.JAVA have different parent directories, DISK1:[ANDREAS] and DISK2:[READONLY], respectively. The idea of being "in" a particular directory may not stand scrutiny. -- Eric Sosman esosman@ieee-dot-org.invalid