Add documentation to loadConfig

This commit is contained in:
Mike Bierlee 2022-10-31 22:07:13 +03:00
parent fec9c1ab71
commit 973317bab5

View file

@ -594,6 +594,14 @@ abstract class ConfigFactory {
ConfigDictionary parseConfig(string contents);
}
/**
* Load config from disk.
* A specific loader will be used based on the file's extension.
* Params:
* configPath = Path to the configuration file.
* Returns: The loaded configuration.
* Throws: ConfigCreationException when the file's extension is unrecognized.
*/
ConfigDictionary loadConfig(const string configPath) {
auto extension = configPath.extension.toLower;
if (extension == ".json") {