[jcifs] listFiles(String wildcard) method

Michael B Allen mba2000 at ioplex.com
Tue Jul 22 06:17:48 EST 2003


> Hi everyone,
>
> I've just started using jcifs and have across a problem using
> listFiles(wildcard). When I use this method it will only return files
> within
> one directory level of a server name. This doesn't happen with just
> listFiles() however, and I can't figure out why as it's just calling
> listFiles("*").
> An example. Using listFiles() and then toString() on the returned array I
> get
> smb://SERVER_NAME/DIRECTORY1/FILE1.JPG
> and
> smb://SERVER_NAME/DIRECTORY1/DIRECTORY2/FILE2.jpg
>
> but when I used listFiles("*jpg") and the toString() I only get
> smb://SERVER_NAME/DIRECTORY1/FILE1.JPG

This is the prescribed behavior. Listing files does not recurse into
sub-directories. Perhaps you could adapt the crawler examples in the
examples directory.

Mike




More information about the jcifs mailing list