Package org.apache.maven.shared.utils.io
Interface ScanConductor
-
@Deprecated public interface ScanConductor
Deprecated.usejava.nio.file.Files.walkFileTree()
and related classesVisitor pattern for the DirectoryScanner. A ScanConductor controls the scanning process.
Create an instance and pass it to
DirectoryScanner.setScanConductor(ScanConductor)
. You will get notified about every visited directory and file. You can use theScanConductor.ScanAction
to control what should happen next.A ScanConductor might also store own information but users must make sure that the state gets cleaned between two scan() invocations.
- Author:
- Mark Struberg
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
ScanConductor.ScanAction
Deprecated.
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description ScanConductor.ScanAction
visitDirectory(java.lang.String name, java.io.File directory)
Deprecated.This method will get invoked for every detected directory.ScanConductor.ScanAction
visitFile(java.lang.String name, java.io.File file)
Deprecated.This method will get invoked for every detected file.
-
-
-
Method Detail
-
visitDirectory
ScanConductor.ScanAction visitDirectory(java.lang.String name, java.io.File directory)
Deprecated.This method will get invoked for every detected directory.- Parameters:
name
- the directory name (contains parent folders up to the pwd)directory
- The directory.- Returns:
- the ScanAction to control how to proceed with the scanning
-
visitFile
ScanConductor.ScanAction visitFile(java.lang.String name, java.io.File file)
Deprecated.This method will get invoked for every detected file.- Parameters:
name
- the file name (contains parent folders up to the pwd)file
- The file.- Returns:
- the ScanAction to control how to proceed with the scanning
-
-