You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Sante (JIRA)" <ji...@apache.org> on 2015/04/08 16:06:12 UTC

[jira] [Created] (VFS-569) DefaultFileMonitor recursive file

Sante created VFS-569:
-------------------------

             Summary: DefaultFileMonitor recursive file
                 Key: VFS-569
                 URL: https://issues.apache.org/jira/browse/VFS-569
             Project: Commons VFS
          Issue Type: Bug
    Affects Versions: 2.0
         Environment: Java 7, windows 8, eclipse lune
            Reporter: Sante


FileSystemManager fsManager = VFS.getManager();
			FileObject fileObj = fsManager.resolveFile("file:///MyFolder");

DefaultFileMonitor fm = new DefaultFileMonitor(listener);
fm.setDelay(1);
fm.setRecursive(false);
fm.addFile(fileObj);
fm.start();

when execute fm.addFile(fileObj); library add listener an internal forder although not recursive.
in this point:

if (file.getType().hasChildren()){
                // Traverse the children
                final FileObject[] children = file.getChildren();
                for (final FileObject element : children) {
                    doAddFile(element);
                }
            }

variable children: should be a file and not a folder!!!



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)