Package example.app.filedatabase
Class FileDatabaseConfigFile
java.lang.Object
example.app.filedatabase.FileDatabaseConfigFile
Class FileDatabaseConfigFile
This class provides the methods for interacting with the database.config file.Structure of the database.config file:
- Every key and it's value is separated by a '='
- Every key value pair is separated by a line terminator
- "root" key represents root database directory
- "root" key's value represents it's directory path
- Lines starting with '#' are ignored
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
FileDatabaseConfigFile
public FileDatabaseConfigFile()
-
-
Method Details
-
create
This method creates a new database.config file. The file path is the present directory- Throws:
IOException- if the file could not be created
-
rootPath
This method returns the path to root directory path from the database.config file. If the root key or it's value not present, null is returned- Returns:
- the path to root directory path or null
- Throws:
IOException- if the file could not be readFileDatabaseConfigFileException
-