[jcifs] SmbFile.isDirectory differs from java.io.File.isDirectory?

Barry Roberts blroberts at xactware.com
Thu Apr 17 03:29:31 EST 2003

I am using a wrapper class so that my application doesn't need to know whether it's using java.io.File or SmbFile.  The api docs for java.io.File say that isDirectory returns:

"true if and only if the file denoted by this abstract pathname exists and is a directory"

SmbFile, however would return true when the directory didn't in fact exist on the Samaba server.  I would think that this is incorrect, and I changed line 1002 in SmbFile.java (0.7.3) from



	if (!exists()) return false;

I don't know if that is correct (not sure what getUncPath0().length() == 1 means), but it did fix my problems with existing code.  Is it possible that this, or something similar could be checked in to jCIFS so that it is more consistent with java.io.File?

Barry Roberts

-------------- next part --------------
HTML attachment scrubbed and removed

More information about the jcifs mailing list