Package org.asciidoctor.jruby
Class AbstractDirectoryWalker
- java.lang.Object
-
- org.asciidoctor.jruby.AbstractDirectoryWalker
-
- All Implemented Interfaces:
java.lang.Iterable<java.io.File>
,DirectoryWalker
- Direct Known Subclasses:
AsciiDocDirectoryWalker
public abstract class AbstractDirectoryWalker extends java.lang.Object implements DirectoryWalker
Base class which inspects parent directory and all subdirectories and returns all files which match certain condition.
-
-
Constructor Summary
Constructors Constructor Description AbstractDirectoryWalker(java.lang.String baseDir)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract boolean
isAcceptedFile(java.io.File filename)
Method to implement which is called to decide if file should be filtered or not.java.util.List<java.io.File>
scan()
Method that finds all files that meets some criteria.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.asciidoctor.jruby.DirectoryWalker
iterator
-
-
-
-
Method Detail
-
scan
public java.util.List<java.io.File> scan()
Method that finds all files that meets some criteria.- Specified by:
scan
in interfaceDirectoryWalker
- Returns:
- List of files which meets the defined criteria.
-
isAcceptedFile
protected abstract boolean isAcceptedFile(java.io.File filename)
Method to implement which is called to decide if file should be filtered or not.- Parameters:
filename
- current file.- Returns:
- true if file should be added to returned list, false otherwise.
-
-