Class AbstractDirectoryWalker

java.lang.Object
org.asciidoctor.jruby.AbstractDirectoryWalker
All Implemented Interfaces:
Iterable<File>, DirectoryWalker
Direct Known Subclasses:
AsciiDocDirectoryWalker

public abstract class AbstractDirectoryWalker extends Object implements DirectoryWalker
Base class which inspects parent directory and all subdirectories and returns all files which match certain condition.
  • Constructor Details

    • AbstractDirectoryWalker

      public AbstractDirectoryWalker(String baseDir)
  • Method Details

    • scan

      public List<File> scan()
      Method that finds all files that meets some criteria.
      Specified by:
      scan in interface DirectoryWalker
      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.