[jcifs] Some additions to SmbFile.java

Michael B. Allen mballen at erols.com
Thu Oct 18 04:55:00 EST 2001


On Wed, Oct 17, 2001 at 04:11:28PM +0200, The DJ wrote:
> Addtionally.
> Wouldn't it be better for the .parent() method in the case of the SmbFile
> being a Share to return smb://servername instead of smb://

It does. That if( url.share == null ) return "smb://" is
misleading. Normally the url.share is not null. You'd have
to really examine the SmbURL code to see why. If you try the
examples/TestSmbFile.java example you'll see that it works:

[miallen at nano jcifs]$ java -Djcifs.properties=miallen.prp TestSmbFile smb://angus/temp 
toString()=smb://angus/temp
getCanonicalPath()=smb://angus/temp
getName()=temp
getParent()=smb://angus
getPath()=smb://angus/temp
getServer()=angus
getShare()=temp
isWorkgroup()=false
toURL().toString()=smb://angus/temp

Mike

-- 
May The Source be with you.




More information about the jcifs mailing list