Article View: borland.public.jbuilder.java.language
Article #18141File Class Bug?
From: Jeff Mrenak
Date: Wed, 12 Aug 1998 00:00
Date: Wed, 12 Aug 1998 00:00
23 lines
1160 bytes
1160 bytes
I am using JB 2.0 on a Win95 machine.
If I create a directory called "12345678" and then in Java do:
File f = new File("12345678");
f.exists() returns true as expected.
But if I then change the directory name to "123456789" and then do:
File f = new File("12345678");
f.exists() returns true again. I can then proceed to list the files in a
directory that does not exist.
It seems that the File class is using the old 8.3 naming scheme. But even
that doesn't make sense since the new name for "12345789" converted back to
the old scheme is "123456~1".
Does anyone have any idea what the heck is going on here and more
importantly, how to get around it?
Thanks in advance.
Jeff
Technical Details
Message-ID:
<6qsutq$5am11@forums.borland.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f74b3,15c4cf5fedc3f7f5,start X-Google-Attributes: gidf74b3,public From: "Jeff Mrenak" <jm73@andrew.cmu.edu> Subject: File Class Bug? Date: 1998/08/12 Message-ID: <6qsutq$5am11@forums.borland.com> X-Deja-AN: 380518947 Organization: Another Netscape Collabra Server User X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3 Newsgroups: borland.public.jbuilder.java.language