# [jcifs] detecting imported shares

Simon Gornall simon at gornall.net
Sun Mar 3 08:43:47 EST 2002

Michael B Allen wrote:
>
> On Fri, 1 Mar 2002 12:04:27 -0000
> "Simon Gornall" <simon at s-a-l-t.co.uk> wrote:
>
> > Hi all,
> >
> > Is it possible using JCIFS to map a name like 'E:\path\to\file' to
> > '//machine/share/path/to/file', assuming that E: is a drive that's been
> > network-mapped ?
>
> You mean DFS? No. That requires additional network processing that will
> probably not be implemented (by me) for some time. It wasn't even in
> todo.txt but I'll add it.

I don't think I mean DFS :-)

All I want to do is work out the UNC filename from the drive: format.

For the time being, I'm going to detect if I'm running on a windows box
then do a System.exec("net use"); which will give me enough to work out
the mapping. Not elegant, but it'll work :-)

Cheers,
Simon.