[jcifs] detecting imported shares

Michael B Allen mballen at erols.com
Sun Mar 3 12:26:34 EST 2002


On Sun, 03 Mar 2002 00:21:25 +0000
Simon Gornall <simon at gornall.net> wrote:

> I'll look into the fileroots idea - it may be useful :-) The "net use" 

I think File.listRoots() is just going to give you drive letters but it
might be good when used in combination with Runtime.exec( "net use" )
(e.g. if a drive is disconnected there's no need to "net use" again).

> seems to give me what I want, but it's a bit inelegant ... I'd prefer 
> a java-only approach if it were available. I'm just like that :-)

The benifit of java-only is write-once-run-anywhere. Once you introduce
"drive letters" you're bound forever to Windows so it doesn't really
matter.

Mike

-- 
May The Source be with you.




More information about the jcifs mailing list