Interface FileHierarchy

All Known Implementing Classes:
DefaultDirectoryHierarchy, FlatDirectoryHierarchy

public interface FileHierarchy
Abstract definition of a file hierarchy (a piece of software, that knows where to find / place a file reflecting a certain class) inside of a nested sub directory structure
  • Method Details

    • getSubDirectory

      Optional<String> getSubDirectory(Class<? extends UniqueEntity> cls, String fileSeparator)
      Determines the correct subdirectory (w.r.t. an arbitrary base directory) for a certain given class using the provided file separator for delimiting between directories and files.
      Parameters:
      cls - Class to define the sub directory for
      fileSeparator - The file separator to use
      Returns:
      An Option to the regarding sub directory as a string
    • getSubDirectory

      default Optional<String> getSubDirectory(Class<? extends UniqueEntity> cls)
      Determines the correct subdirectory (w.r.t. an arbitrary base directory) for a certain given class using the Unix file separator for delimiting between directories and files.
      Parameters:
      cls - Class to define the sub directory for
      Returns:
      An Option to the regarding sub directory as a string
    • getBaseDirectory

      Optional<String> getBaseDirectory()
      Determines the base directory.
      Returns:
      An option to the base directory