[jcifs] Question about listFiles[] when used to list shares

Michael B Allen mba2000 at ioplex.com
Wed Nov 1 03:14:13 GMT 2006

On Tue, 31 Oct 2006 14:09:11 -0500
Karl Wright <kwright at metacarta.com> wrote:

> Hi Mr. Allen,
> My name is Karl Wright.  I'm using the 1.2.9 jcifs library to access 
> windows and samba shares in order to pull content into a search engine. 
>   However, I'm having some difficulty and I was wondering if you had any 
> suggestions.  Specifically, when I use SmbFile.listFiles() to get a list 
> of the available shares, I don't see all of them, if there are a lot. 
> For the case I am trying here, I see all but two.  This is borne out by 
> the response packet, which I've printed out here:
> Response was: 
> NetShareEnumResponse[command=SMB_COM_TRANSACTION,received=false,errorCode=0,flags=0x0090,flags2=0xC003,signSeq=0,tid=2048, 
> pid=28108,uid=2048,mid=3,wordCount=10,byteCount=2078,totalParameterCount=8,totalDataCount=2069,parameterCount=8, 
> parameterOffset=56,parameterDisplacement=0,dataCount=2069,dataOffset=64,dataDisplacement=0,setupCount=0,pad=1,pad1=0, 
> status=0,converter=62954,entriesReturned=54,totalAvailableEntries=56]
> Note that the totalAvailableEntries field is correct (56), but the 
> entriesReturned is too small (54).  How would I retrieve *all* the share 
> names?  It looks to me like the maxDataCount field might set an upper 
> bound on the amount of data that can be retrieved in one call to the 
> server - is there any way to request more, either by increasing that 
> amount, or by making more requests?
> Thanks,
> Karl

Michael B Allen
PHP Active Directory SSO

More information about the jcifs mailing list