org.asciidoctor
Class DirectoryWalker

java.lang.Object
  extended by org.asciidoctor.DirectoryWalker
Direct Known Subclasses:
AsciiDocDirectoryWalker

public abstract class DirectoryWalker
extends Object

Base class which inspects parent directory and all subdirectories and returns all files which match certain condition.

Author:
lordofthejars

Constructor Summary
DirectoryWalker(String baseDir)
           
 
Method Summary
protected abstract  boolean isAcceptedFile(File filename)
          Method to implement which is called to decide if file should be filtered or not.
 List<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
 

Constructor Detail

DirectoryWalker

public DirectoryWalker(String baseDir)
Method Detail

scan

public List<File> scan()
Method that finds all files that meets some criteria.

Returns:
List of files which meets the defined criteria.

isAcceptedFile

protected abstract boolean isAcceptedFile(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.


Copyright © 2013. All Rights Reserved.