[jcifs] couldn't get UNC path

Christopher R. Hertel crh at ubiqx.mn.org
Fri Aug 1 04:49:05 EST 2003


I am not aware of a mechansim for converting DOS pathnames to their 
fully-specified UNC pathname.  The mapping of the drive letter ('O', in 
this case) to the UNC pathname is typically handled in the redirector, 
which is part of the DOS, Windows, or OS/2 "kernel".  You'd have to make a 
system call to retrieve that information.

Chris -)-----

On Thu, Jul 31, 2003 at 11:30:03AM -0700, adf afdf wrote:
> I tried to use the following the code to get a file's
> UNC path. But it didn't work.
> 
> File f = new File("O:\path\file.txt");
> SmbFile s=new SmbFile(f.toURL());
> String path = SmbFile.getUncPath();
> 
> It will give me like:
> path = \\\O:\path\file.txt
> 
> any thing wrong?
> 
> __________________________________
> Do you Yahoo!?
> Yahoo! SiteBuilder - Free, easy-to-use web site design software
> http://sitebuilder.yahoo.com

-- 
"Implementing CIFS - the Common Internet FileSystem" ISBN: 013047116X
Samba Team -- http://www.samba.org/     -)-----   Christopher R. Hertel
jCIFS Team -- http://jcifs.samba.org/   -)-----   ubiqx development, uninq.
ubiqx Team -- http://www.ubiqx.org/     -)-----   crh at ubiqx.mn.org
OnLineBook -- http://ubiqx.org/cifs/    -)-----   crh at ubiqx.org



More information about the jcifs mailing list