wangjunbao created VFS-511:
------------------------------

             Summary: FilterSelector url bug
                 Key: VFS-511
                 URL: https://issues.apache.org/jira/browse/VFS-511
             Project: Commons VFS
          Issue Type: Bug
    Affects Versions: 1.0
         Environment: java version "1.7.0_21"
Java(TM) SE Runtime Environment (build 1.7.0_21-b11)
Java HotSpot(TM) 64-Bit Server VM (build 23.21-b01, mixed mode)
            Reporter: wangjunbao


when I use vfs1.0,I use the FilterSelector API to filter files ,It occured an 
error ,error log:
Exception in thread "main" org.apache.commons.vfs.FileSystemException: Could 
not find files in "file:///home/****/temp".
code:
  FileSelector fs = new FileSelector() {
                                    public boolean includeFile(FileSelectInfo 
fsi) throws Exception {
                                                FileObject fo = fsi.getFile();
                                                return 
fo.getName().getBaseName().startsWith("a");
                                    }

                                    public boolean 
traverseDescendents(FileSelectInfo fsi) throws Exception {
                                                return true;
                                    }
                        };
                        FileSystemManager sfm = VFS.getManager();
                        FileObject fo = sfm.resolveFile("/home/zcwangjb/temp");
                        FileObject[] fos= fo.findFiles(fs);
                        for (FileObject f : fos) {
                                    
System.out.println(f.getName().getBaseName());
                        }
the rease why the error come is that I have a file named dfj\djf\test.data 
,please fix the issue ,thanks



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Reply via email to