Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #9902

Re: A strange behaviour of a File property

Path csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!usenet.ukfsn.org!not-for-mail
From Martin Gregorie <martin@address-in-sig.invalid>
Newsgroups comp.lang.java.programmer
Subject Re: A strange behaviour of a File property
Date Sun, 13 Nov 2011 12:42:27 +0000 (UTC)
Organization UK Free Software Network
Lines 48
Message-ID <j9odvj$ti8$1@localhost.localdomain> (permalink)
References <5980efbc-9010-4145-b886-fe106c5ac2d5@c18g2000yqj.googlegroups.com> <slrnjbqj37.fvg.avl@gamma.logic.tuwien.ac.at> <j9kion$7o7$1@dont-email.me> <slrnjbrpia.fvg.avl@gamma.logic.tuwien.ac.at> <j9ls7c$5t9$1@dont-email.me> <slrnjbtrll.fvg.avl@gamma.logic.tuwien.ac.at> <4ebef5e8$0$290$14726298@news.sunsite.dk> <slrnjbu79d.fvg.avl@gamma.logic.tuwien.ac.at> <4ebf2081$0$289$14726298@news.sunsite.dk>
NNTP-Posting-Host 84.45.235.129
Mime-Version 1.0
Content-Type text/plain; charset=UTF-8
Content-Transfer-Encoding 8bit
X-Trace localhost.localdomain 1321188147 30280 84.45.235.129 (13 Nov 2011 12:42:27 GMT)
X-Complaints-To usenet@localhost.localdomain
NNTP-Posting-Date Sun, 13 Nov 2011 12:42:27 +0000 (UTC)
User-Agent Pan/0.135 (Tomorrow I'll Wake Up and Scald Myself with Tea; GIT 30dc37b master)
Xref x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:9902

Show key headers only | View raw


On Sat, 12 Nov 2011 20:42:21 -0500, Arne Vajhøj wrote:

> On 11/12/2011 8:28 PM, Andreas Leitgeb wrote:
>> Arne Vajhøj<arne@vajhoej.dk>  wrote:
>>> On 11/12/2011 5:09 PM, Andreas Leitgeb wrote:
>>>> Eric Sosman<esosman@ieee-dot-org.invalid>   wrote:
>>>>> On 11/11/2011 10:21 PM, Andreas Leitgeb wrote:
>>>>>> Eric Sosman<esosman@ieee-dot-org.invalid>    wrote:
>>>>>>> [...]   Note that in some file systems there is no such thing as a
>>>>>>> "path separator;" on one such I had files with names like
>>>>>>> 	SYS$DISK:[USERS.ERIC.PROJECT]README.TXT;22
>>>>>> Such beasts still exist in the wild?
>>>>> http://en.wikipedia.org/wiki/Files-11#Disk_organization_and_naming
>>>>>        "A fossil!" I hear you cry, "A dried relic of prehistory!"
>>>> I'm not the type who would cry out about it, but I admit, I did think
>>>> something more or less similar.
>>> I do not consider version numbers prehistoric relics.
>>
>> Of course not those... (I think I've seen them even in some modern
>> filesystems with versioning support).
>> But I do consider the brackets enclosing the directory part of a file's
>> path to be such. (namely prehistoric relics)
> 
> So / is modern but [] is oldfashioned.
> 
> Are there any objective reason for that?
> 
>>> * Java actually supports both native syntax and traditional
>>>     *nix / syntax for filenames
>>
>> So that gets us back to the start:
>>   Just using "/" as dir-separator is very likely to get you far enough.
> 
> It will get you to where a user actually specify a filename in normal
> native syntax.
>
... but its best to get into the habit of assembling a filename along the 
lines of 
	dirNameList + File.separator + fileName

rather than using
	dirNameList + "/" + fileName


-- 
martin@   | Martin Gregorie
gregorie. | Essex, UK
org       |

Back to comp.lang.java.programmer | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

A strange behaviour of a File property alelvb@inwind.it - 2011-11-11 05:45 -0800
  Re: A strange behaviour of a File property Lew <lewbloch@gmail.com> - 2011-11-11 07:34 -0800
    Re: A strange behaviour of a File property alelvb@inwind.it - 2011-11-11 09:28 -0800
      Re: A strange behaviour of a File property Lew <lewbloch@gmail.com> - 2011-11-11 14:17 -0800
        Re: A strange behaviour of a File property alelvb@inwind.it (Alexo) - 2011-11-12 15:04 +0100
          Re: A strange behaviour of a File property Eric Sosman <esosman@ieee-dot-org.invalid> - 2011-11-12 09:15 -0500
            Re: A strange behaviour of a File property alelvb@inwind.it (Alexo) - 2011-11-12 16:17 +0100
              Re: A strange behaviour of a File property Zlatko Đurić <zladuric@gmail.com> - 2011-11-12 16:09 +0100
              Re: A strange behaviour of a File property Eric Sosman <esosman@ieee-dot-org.invalid> - 2011-11-12 10:13 -0500
  Re: A strange behaviour of a File property Andreas Leitgeb <avl@gamma.logic.tuwien.ac.at> - 2011-11-11 16:25 +0000
    Re: A strange behaviour of a File property alelvb@inwind.it - 2011-11-11 09:42 -0800
      Re: A strange behaviour of a File property Arne Vajhøj <arne@vajhoej.dk> - 2011-11-11 13:24 -0500
    Re: A strange behaviour of a File property Lew <lewbloch@gmail.com> - 2011-11-11 14:13 -0800
    Re: A strange behaviour of a File property Eric Sosman <esosman@ieee-dot-org.invalid> - 2011-11-11 20:38 -0500
      Re: A strange behaviour of a File property Andreas Leitgeb <avl@gamma.logic.tuwien.ac.at> - 2011-11-12 03:21 +0000
        Re: A strange behaviour of a File property Eric Sosman <esosman@ieee-dot-org.invalid> - 2011-11-12 08:26 -0500
          Re: A strange behaviour of a File property Andreas Leitgeb <avl@gamma.logic.tuwien.ac.at> - 2011-11-12 22:09 +0000
            Re: A strange behaviour of a File property Arne Vajhøj <arne@vajhoej.dk> - 2011-11-12 17:40 -0500
              Re: A strange behaviour of a File property Andreas Leitgeb <avl@gamma.logic.tuwien.ac.at> - 2011-11-13 01:28 +0000
                Re: A strange behaviour of a File property Arne Vajhøj <arne@vajhoej.dk> - 2011-11-12 20:42 -0500
                Re: A strange behaviour of a File property Andreas Leitgeb <avl@gamma.logic.tuwien.ac.at> - 2011-11-13 12:15 +0000
                Re: A strange behaviour of a File property Martin Gregorie <martin@address-in-sig.invalid> - 2011-11-13 12:42 +0000
                Re: A strange behaviour of a File property Andreas Leitgeb <avl@gamma.logic.tuwien.ac.at> - 2011-11-13 13:06 +0000
        Re: A strange behaviour of a File property Arne Vajhøj <arne@vajhoej.dk> - 2011-11-12 17:25 -0500
          Re: A strange behaviour of a File property Andreas Leitgeb <avl@gamma.logic.tuwien.ac.at> - 2011-11-13 01:15 +0000
            Re: A strange behaviour of a File property Arne Vajhøj <arne@vajhoej.dk> - 2011-11-12 20:40 -0500
              Re: A strange behaviour of a File property Andreas Leitgeb <avl@gamma.logic.tuwien.ac.at> - 2011-11-13 12:42 +0000
            Re: A strange behaviour of a File property Eric Sosman <esosman@ieee-dot-org.invalid> - 2011-11-12 21:11 -0500
              Re: A strange behaviour of a File property Andreas Leitgeb <avl@gamma.logic.tuwien.ac.at> - 2011-11-13 20:50 +0000
                Re: A strange behaviour of a File property Eric Sosman <esosman@ieee-dot-org.invalid> - 2011-11-14 08:18 -0500
                Re: A strange behaviour of a File property Andreas Leitgeb <avl@gamma.logic.tuwien.ac.at> - 2011-11-14 17:38 +0000
                Re: A strange behaviour of a File property Eric Sosman <esosman@ieee-dot-org.invalid> - 2011-11-14 21:51 -0500
                Re: A strange behaviour of a File property Andreas Leitgeb <avl@gamma.logic.tuwien.ac.at> - 2011-11-15 14:17 +0000
                Re: A strange behaviour of a File property Eric Sosman <esosman@ieee-dot-org.invalid> - 2011-11-15 22:20 -0500
                Re: A strange behaviour of a File property Andreas Leitgeb <avl@gamma.logic.tuwien.ac.at> - 2011-11-16 12:14 +0000
                Re: A strange behaviour of a File property Eric Sosman <esosman@ieee-dot-org.invalid> - 2011-11-16 08:10 -0500
      Re: A strange behaviour of a File property Daniel Pitts <newsgroup.nospam@virtualinfinity.net> - 2011-11-11 19:46 -0800
      Re: A strange behaviour of a File property Owen Jacobson <angrybaldguy@gmail.com> - 2011-11-14 00:24 -0500
        Re: A strange behaviour of a File property Lew <lewbloch@gmail.com> - 2011-11-13 22:00 -0800
  Re: A strange behaviour of a File property Roedy Green <see_website@mindprod.com.invalid> - 2011-11-12 05:00 -0800
    Re: A strange behaviour of a File property Arne Vajhøj <arne@vajhoej.dk> - 2011-11-12 09:15 -0500

csiph-web