Article View: borland.public.jbuilder.java.language
Article #17504Re: Listing Local and Network Drives?
From: Rekha Venkatesh
Date: Thu, 05 Nov 1998 00:00
Date: Thu, 05 Nov 1998 00:00
40 lines
2364 bytes
2364 bytes
I forget in which file in the src directory, but there was a hack in which you go in a loop for each alphabet and build a file object and check if it exists. That's what we did for our customized file dialog. Not a efficient way but works. There is no way to differentiate if it is local or a mapped network drive. Rekha John P. McGrath <mcgrath@enter.net> wrote in article <MPG.10a9bffc39ea51889896fa@forums.inprise.com>... > Dr. Matt H. Stevens <mhstevens@mmm.com> wrote: > > > Hi All, I am trying to write a custom FileDialog and I am running into > > one problem, (1) How do you get a list (in java) of the available local > > and network drives on a WinNT system? (2) A better question is what is > > the specific type of component that is used as the "Look In:" choice box > > that is placed at the top of the standard FileDialog Box? Is there a way > > to get this information without having to write an external EXE in > > either Delphi or C++builder to extract this information? Thanks in > > Advance, Matt mhstevens@mmm.com > > The FileDialog class is an AWT component, so it is implemented using a > heavyweight peer class (java.awt.peer.FileDialogPeer). I don't think > you will find any methods here that will provide the information that > you want. > > The Swing FileChooser is implemented entirely in Java, and it seems to > do what you want. However, I looked at source of FileChooser, and it > looks like it is pretty much a hack. And the Swing package does not > contain the source code that actually determines which filesystems are > available. But the code is in Java, so it must be possible. > > -- > Regards, > > John P. McGrath > <mcgrath@enter.net> > <jpm@nscs.fast.net> >
Technical Details
Message-ID:
<01be08cb$2531b330$fdbc12c7@rvenkatesh>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<363F2FC4.781BE17D@mmm.com> <MPG.10a9bffc39ea51889896fa@forums.inprise.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f74b3,98c1f9048012a65e X-Google-Attributes: gidf74b3,public From: "Rekha Venkatesh" <rvenkate@alta-oh.com> Subject: Re: Listing Local and Network Drives? Date: 1998/11/05 Message-ID: <01be08cb$2531b330$fdbc12c7@rvenkatesh> X-Deja-AN: 408674780 Content-Transfer-Encoding: 7bit References: <363F2FC4.781BE17D@mmm.com> <MPG.10a9bffc39ea51889896fa@forums.inprise.com> Content-Type: text/plain; charset=ISO-8859-1 Organization: Another Netscape Collabra Server User Mime-Version: 1.0 Newsgroups: borland.public.jbuilder.java.language