[jcifs] Equivalent for java.io.File.getCanonicalPath()

Julian Reschke julian.reschke at gmx.de
Fri Jan 30 12:04:15 GMT 2004


I'm looking for a jcifs equivalent of java.io.File.getCanonicalPath(). 
Note that SmbFile.getCanonicalPath() does *not* do the same.

For instance, given a filename "a" on an NTFS filesystem, 
java.io.File.getCanonicalPath() will return "a" for each of

(new File("A")).getCanonicalPath()
(new File("a")).getCanonicalPath()
(new File("A ")).getCanonicalPath()

and so on... (alternatively I'd need a way to find out whether two 
distinct SmbFile objects refer to the same file on the remote filesystem).

Regards, Julian

<green/>bytes GmbH -- http://www.greenbytes.de -- tel:+492512807760

More information about the jcifs mailing list