Class FileVisitor

java.lang.Object
eu.bandm.tools.util.FileVisitor
Direct Known Subclasses:
FileTree.Visitor

public class FileVisitor extends Object
Applies visitor style pattern to file system trees.
  • Constructor Details

    • FileVisitor

      public FileVisitor()
  • Method Details

    • visit

      public void visit(File f)
      Central entry method.
      Is called for applying the visitor. Normally will not be overwritten. Calls directly visitNonDir(File) or visitDir(File), depending on the type of the file.
      Parameters:
      f - position in the file system from which visiting shall descend.
    • visitDir_pre

      public void visitDir_pre(File f)
      To be overwritten by payload code, if wanted. Is called for every directory before descending into the contained files.
    • visitDir_post

      public void visitDir_post(File f)
      To be overwritten by payload code, if wanted. Is called for every directory after descending into the contained files.
    • visitNonDir

      public void visitNonDir(File f)
      To be overwritten by payload code, if wanted. Is called for every non-directory file.