/** * Some visitors can handle symlinks as symlinks. Those visitors should implement * this method to provide a different handling for symlink. * <p> * This method is invoked by those {@link DirScanner}s that can handle symlinks as symlinks. * (Not every {@link DirScanner}s are capable of doing that, as proper symlink handling requires * letting visitors decide whether or not to descend into a symlink directory.) */ public void visitSymlink(File link, String target, String relativePath) throws IOException { visit(link,relativePath); }
/** * @since 1.532 */ protected final void scanSingle(File f, String relative, FileVisitor visitor) throws IOException { if (visitor.understandsSymlink()) { String target; try { target = Util.resolveSymlink(f); } catch (IOException x) { // JENKINS-13202 target = null; } if (target != null) { visitor.visitSymlink(f, target, relative); return; } } visitor.visit(f, relative); }
public void visit(File f, String relativePath) throws IOException { if(f.isDirectory() || filter.accept(f)) visitor.visit(f,relativePath); }
private void scan(File f, String path, FileVisitor visitor) throws IOException { if (f.canRead()) { if (visitor.understandsSymlink()) { String target = Util.resolveSymlink(f, TaskListener.NULL); if (target != null) { visitor.visitSymlink(f, target, path + f.getName()); return; } } visitor.visit(f, path + f.getName()); if (f.isDirectory()) { for (File child : f.listFiles()) { scan(child, path + f.getName() + '/', visitor); } } } }
@Override public void visit(File f, String relativePath) throws IOException { filter.read(f); v.visit(f,relativePath); }
/** * Some visitors can handle symlinks as symlinks. Those visitors should implement * this method to provide a different handling for symlink. * <p> * This method is invoked by those {@link DirScanner}s that can handle symlinks as symlinks * (not every {@link DirScanner}s are capable of doing that, as proper symlink handling requires * letting visitors decide whether or not to descend into a symlink directory. */ public void visitSymlink(File link, String target, String relativePath) throws IOException { visit(link,relativePath); }
/** * Some visitors can handle symlinks as symlinks. Those visitors should implement * this method to provide a different handling for symlink. * <p> * This method is invoked by those {@link DirScanner}s that can handle symlinks as symlinks. * (Not every {@link DirScanner}s are capable of doing that, as proper symlink handling requires * letting visitors decide whether or not to descend into a symlink directory.) */ public void visitSymlink(File link, String target, String relativePath) throws IOException { visit(link,relativePath); }
/** * Some visitors can handle symlinks as symlinks. Those visitors should implement * this method to provide a different handling for symlink. * <p> * This method is invoked by those {@link DirScanner}s that can handle symlinks as symlinks * (not every {@link DirScanner}s are capable of doing that, as proper symlink handling requires * letting visitors decide whether or not to descend into a symlink directory. */ public void visitSymlink(File link, String target, String relativePath) throws IOException { visit(link,relativePath); }
/** * Some visitors can handle symlinks as symlinks. Those visitors should implement * this method to provide a different handling for symlink. * <p> * This method is invoked by those {@link DirScanner}s that can handle symlinks as symlinks * (not every {@link DirScanner}s are capable of doing that, as proper symlink handling requires * letting visitors decide whether or not to descend into a symlink directory. */ public void visitSymlink(File link, String target, String relativePath) throws IOException { visit(link,relativePath); }
/** * Some visitors can handle symlinks as symlinks. Those visitors should * implement this method to provide a different handling for symlink. <p> * This method is invoked by those {@link DirScanner}s that can handle * symlinks as symlinks (not every {@link DirScanner}s are capable of doing * that, as proper symlink handling requires letting visitors decide whether * or not to descend into a symlink directory. */ public void visitSymlink(File link, String target, String relativePath) throws IOException { visit(link, relativePath); }
public void visit(File f, String relativePath) throws IOException { if(f.isDirectory() || filter.accept(f)) visitor.visit(f,relativePath); }
public void visit(File f, String relativePath) throws IOException { if(f.isDirectory() || filter.accept(f)) visitor.visit(f,relativePath); }
public void visit(File f, String relativePath) throws IOException { if(f.isDirectory() || filter.accept(f)) visitor.visit(f,relativePath); }
public void visit(File f, String relativePath) throws IOException { if (f.isDirectory() || filter.accept(f)) { visitor.visit(f, relativePath); } } private static final FileFilter PASS_THROUGH = new FileFilter() {
public void visit(File f, String relativePath) throws IOException { if(f.isDirectory() || filter.accept(f)) visitor.visit(f,relativePath); }
@Override public void visit(File f, String relativePath) throws IOException { filter.read(f); v.visit(f,relativePath); }
public void scan(File dir, FileVisitor visitor) throws IOException { if(fixEmpty(includes)==null && excludes==null) { // optimization new Full().scan(dir,visitor); return; } FileSet fs = Util.createFileSet(dir,includes,excludes); if(dir.exists()) { DirectoryScanner ds = fs.getDirectoryScanner(new org.apache.tools.ant.Project()); for( String f : ds.getIncludedFiles()) { File file = new File(dir, f); visitor.visit(file,f); } } }
public void scan(File dir, FileVisitor visitor) throws IOException { if (fixEmpty(includes) == null && excludes == null) { // optimization new Full().scan(dir, visitor); return; } FileSet fs = Util.createFileSet(dir, includes, excludes); if (dir.exists()) { DirectoryScanner ds = fs.getDirectoryScanner(new org.apache.tools.ant.Project()); for (String f : ds.getIncludedFiles()) { File file = new File(dir, f); visitor.visit(file, f); } } } private static final long serialVersionUID = 1L;
public void scan(File dir, FileVisitor visitor) throws IOException { if(fixEmpty(includes)==null && excludes==null) { // optimization new Full().scan(dir,visitor); return; } FileSet fs = Util.createFileSet(dir,includes,excludes); if(dir.exists()) { DirectoryScanner ds = fs.getDirectoryScanner(new org.apache.tools.ant.Project()); for( String f : ds.getIncludedFiles()) { File file = new File(dir, f); visitor.visit(file,f); } } }
public void scan(File dir, FileVisitor visitor) throws IOException { if(fixEmpty(includes)==null && excludes==null) { // optimization new Full().scan(dir,visitor); return; } FileSet fs = Util.createFileSet(dir,includes,excludes); if(dir.exists()) { DirectoryScanner ds = fs.getDirectoryScanner(new org.apache.tools.ant.Project()); for( String f : ds.getIncludedFiles()) { File file = new File(dir, f); visitor.visit(file,f); } } }