commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <>
Subject VFS/WebDav findFile problem with nested directories?
Date Fri, 14 Oct 2005 19:08:21 GMT
Is this a bug, or am I misusing VFS?

I'm trying to recusively find all the file in a
directory tree. This works fine with a local
directory, but using a WebDav URL, I only get the
first level (lower level directories don't get
returned in the findFiles for the root directory).

I'm using the VFS nightly build 20051014, and
jakarta-slide-webdavclient-bin-2.1, Java 1.4.2_08.

  static void recurse (FileObject dir) throws
FileSystemException {
    System.out.println("All files of " +
    FileObject[] children = dir.findFiles(new
    if (children != null)
    for (int i = 0; i < children.length; i++) {
      if (children[i].equals(dir)) continue;
(children[i].getType().equals(FileType.FOLDER)) {
        System.out.println ("dipping into " +
        recurse (children[i]);

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message