Package hudson.util
Class DirScanner
- java.lang.Object
-
- hudson.util.DirScanner
-
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
DirScanner.Full
,DirScanner.Glob
,FilePath.ExplicitlySpecifiedDirScanner
public abstract class DirScanner extends Object implements Serializable
Visits a directory and its contents and pass them to theFileVisitor
. ADirScanner
encapsulates the logic of how it filters files in the directory. It is also remotable.- Since:
- 1.343
- See Also:
FileVisitor
, Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
DirScanner.Filter
Scans by filtering things out fromFileFilter
.static class
DirScanner.Full
Scans everything recursively.static class
DirScanner.Glob
Scans by using Ant GLOB syntax.
-
Constructor Summary
Constructors Constructor Description DirScanner()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract void
scan(File dir, FileVisitor visitor)
Scans the given directory and pass files onto the given visitor.protected void
scanSingle(File f, String relative, FileVisitor visitor)
-
-
-
Method Detail
-
scan
public abstract void scan(File dir, FileVisitor visitor) throws IOException
Scans the given directory and pass files onto the given visitor.- Throws:
IOException
-
scanSingle
protected final void scanSingle(File f, String relative, FileVisitor visitor) throws IOException
- Throws:
IOException
- Since:
- 1.532
-
-