Interface ModuleDetector.FileSystem

Enclosing class:
ModuleDetector

public static interface ModuleDetector.FileSystem
Facade for file system operations. May be replaced by stubs in test cases.
  • Method Summary

    Modifier and Type
    Method
    Description
    find(Path root, String pattern)
    Returns all file names that match the specified pattern.
    open(String fileName)
    Creates an InputStream from the specified filename.
  • Method Details

    • find

      String[] find(Path root, String pattern)
      Returns all file names that match the specified pattern.
      Parameters:
      root - root directory to start the search from
      pattern - the Ant pattern to search for
      Returns:
      the found file names
    • open

      @MustBeClosed InputStream open(String fileName) throws IOException, InvalidPathException
      Creates an InputStream from the specified filename.
      Parameters:
      fileName - the file name
      Returns:
      the input stream
      Throws:
      IOException - if the stream could not be opened
      InvalidPathException - if the file name is invalid