Package edu.ie3.datamodel.io.naming
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 Summary
Modifier and TypeMethodDescriptionDetermines the base directory.getSubDirectory
(Class<? extends UniqueEntity> cls) Determines the correct subdirectory (w.r.t.getSubDirectory
(Class<? extends UniqueEntity> cls, String fileSeparator) Determines the correct subdirectory (w.r.t.
-
Method Details
-
getSubDirectory
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 forfileSeparator
- The file separator to use- Returns:
- An Option to the regarding sub directory as a string
-
getSubDirectory
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
Determines the base directory.- Returns:
- An option to the base directory
-