🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.api
Article #824

Re: java.io.File network file access

#824
From: Shankar Unni
Date: Fri, 30 Aug 2002 15:57
25 lines
2136 bytes
Zak wrote:

> java.io.File f = new java.io.File("w:\");

You mean "w:\\", or it wouldn't compile. You can also say w:/, by the 
way, or just "w:".

> in this case the W:\ drive is mapped on the server.  canRead() 
 > returns false, isDirectory return false and files is null

Can't reproduce this. I just tried here (on WinXP), and got the expected 
behavior whether W: was an "actual" drive, a mapped (using subst) local 
directory or a mapped network share.

(Is your w: a CD-ROM, perchance?)

> I can use this same code to access any partition on the server but can't
> access anything on the network whether using a mapped drive or the UNC
> \\ntserver-5 .  Is this a permissions problem or something else.  I don't
> get any error.

In any case, you can't just open \\ntserver-5. (I hope you said 
"\\\\nt-server5" in your source!). You can't browse the shares on a 
server using the regular File API. You can, however, browse 
"\\\\nt-server5\\Some Share"), provided you have the right permissions.
Technical Details
Message-ID: <3D6F9604.1030806@cotagesoft.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-04!supernews.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!colt.net!newsfeed.esat.net!lnewspeer01.lnd.ops.eu.uu.net!emea.uu.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <3d6f8ccf$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 1089d0,8ca1abe1999c4a14
X-Google-Attributes: gid1089d0,public
X-Google-ArrivalTime: 2002-08-30 09:18:17 PST
Message-ID: <3D6F9604.1030806@cotagesoft.com>
Date: Fri, 30 Aug 2002 08:57:56 -0700
From: Shankar Unni <shankar@cotagesoft.com>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.0.1) Gecko/20020823 Netscape/7.0
X-Accept-Language: en-us, en
MIME-Version: 1.0
Newsgroups: borland.public.jbuilder.java.api
Subject: Re: java.io.File network file access
References: <3d6f8ccf$1@newsgroups.borland.com>
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 63.193.31.178
X-Trace: newsgroups.borland.com 1030723222 63.193.31.178 (30 Aug 2002 09:00:22 -0700)
Lines: 26
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-04!supernews.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!colt.net!newsfeed.esat.net!lnewspeer01.lnd.ops.eu.uu.net!emea.uu.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail