Article View: borland.public.jbuilder.java.api
Article #3588Universal Naming Convention (UNC) and the Java File Class
From: Dallas Harken
Date: Wed, 12 Nov 1997 00:00
Date: Wed, 12 Nov 1997 00:00
21 lines
1295 bytes
1295 bytes
I have a small application that reads a file on my network. I use the File class to check the file's existence first. File f = new File(filePath); if (f.exists()) ... If I map a drive to the network location, ie. filePath = "p:\dir\myfile.txt", everthing works great. However, if I set filePath = "//server/volume/dir/myfile.txt", the exists function returns false. Using / or \ as a separator doesn't matter. Interesting note: Works when compling with Visual J++ works, but not with JBuilder. I also get a FileNotFoundException if I use the same file path with the FileInputStream class. Could it be a problem with the native implementation of functions such as open, etc? Any ideas?
Technical Details
Message-ID:
<64d439$rpu3@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: 1089d0,5d21d90b0c733d09,start X-Google-Attributes: gid1089d0,public X-Google-Thread: f74b3,5d21d90b0c733d09,start X-Google-Attributes: gidf74b3,public From: "Dallas Harken" <dharken@novell.com> Subject: Universal Naming Convention (UNC) and the Java File Class Date: 1997/11/12 Message-ID: <64d439$rpu3@forums.borland.com> X-Deja-AN: 289117258 X-MimeOLE: Produced By Microsoft MimeOLE V4.71.1712.3 Organization: Novell, Inc. Newsgroups: borland.public.jbuilder.java.api,borland.public.jbuilder.java.language