[jcifs] smbfile.listFiles() for only directories

MacDermid, Kenny kenny.macdermid at abridean.com
Thu Sep 16 17:32:53 GMT 2004


> From: Michael B Allen [mailto:mba2000 at ioplex.com]
>
> On Tue, 14 Sep 2004 14:13:41 -0400
> Michael B Allen <mba2000 at ioplex.com> wrote:
>=20
> > On Tue, 14 Sep 2004 08:28:26 -0600
> > "MacDermid, Kenny" <kenny.macdermid at abridean.com> wrote:
> >=20
> > > Hello,
> > >=20
> > > I'm looking for a way to have jcifs only list directories on a=20
> > > listFiles(). I was hoping that there might be a way to do this in=20
> > > the request passed across the network,
> >=20
> > Use DosFileFilter("*", SmbFile.ATTR_DIRECTORY) with
> listFiles(filter).

Thanks for your quick reply.

Tried this:

listFiles(new jcifs.smb.DosFileFilter("*", =
jcifs.smb.SmbFile.ATTR_DIRECTORY))

Still get back files :-(

Seems it's getting passed along all the way to the request as =
SearchAttributes=3D0x10 (16 is ATTR_DIRECTORY). Then ff.accept in =
doFindFirstNext accepts it, as it doesn't check the attributes (it says =
the server should be doing that).

Attributes on the file that is return is:
0x2820 - something + ATTR_COMPRESSED + ATTR_ARCHIVE

So there is no 0x10 bit set.

Any ideas?

Kenny

--=20
Outgoing mail is certified Virus Contaminated:
X5O!P%@AP[4(P^)7CC)7$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*
Checked by AVG Anti-Virus (http://www.grisoft.com).
Version: 7.0.271 / Virus Database: 264.9.1 - Release Date: 15/09/2004
=20


More information about the jcifs mailing list