Interface FileFactory

All Known Implementing Classes:
FileSystemFileFactory

public interface FileFactory
Interface for file operations. This interface exists so that we can mock out IO operations in unit tests.
Since:
v4.3
  • Method Summary

    Modifier and Type
    Method
    Description
    getFile(String absoluteFilename)
    Creates a File object for the file with the given path.
    void
    removeDirectory(File directory)
    Removes a directory.
    void
    Removes a directory if it exists.
  • Method Details

    • getFile

      File getFile(String absoluteFilename)
      Creates a File object for the file with the given path.
      Parameters:
      absoluteFilename - a String containing an absolute path name
      Returns:
      a new File
    • removeDirectory

      void removeDirectory(File directory)
      Removes a directory.
      Parameters:
      directory - a File object
    • removeDirectoryIfExists

      void removeDirectoryIfExists(String directoryName)
      Removes a directory if it exists.
      Parameters:
      directoryName - a String containing a directory path