Package eu.bandm.tools.util
Class FileVisitor
java.lang.Object
eu.bandm.tools.util.FileVisitor
- Direct Known Subclasses:
FileTree.Visitor
Applies visitor style pattern to file system trees.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Central entry method.void
To be overwritten by payload code, if wanted.void
visitDir_pre
(File f) To be overwritten by payload code, if wanted.void
visitNonDir
(File f) To be overwritten by payload code, if wanted.
-
Constructor Details
-
FileVisitor
public FileVisitor()
-
-
Method Details
-
visit
Central entry method.
Is called for applying the visitor. Normally will not be overwritten. Calls directlyvisitNonDir(File)
orvisitDir(File)
, depending on the type of the file.- Parameters:
f
- position in the file system from which visiting shall descend.
-
visitDir_pre
To be overwritten by payload code, if wanted. Is called for every directory before descending into the contained files. -
visitDir_post
To be overwritten by payload code, if wanted. Is called for every directory after descending into the contained files. -
visitNonDir
To be overwritten by payload code, if wanted. Is called for every non-directory file.
-