diff options
Diffstat (limited to 'Libraries/LibCore/ConfigFile.cpp')
-rw-r--r-- | Libraries/LibCore/ConfigFile.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Libraries/LibCore/ConfigFile.cpp b/Libraries/LibCore/ConfigFile.cpp index a36d99d3bd..267513e9da 100644 --- a/Libraries/LibCore/ConfigFile.cpp +++ b/Libraries/LibCore/ConfigFile.cpp @@ -34,6 +34,14 @@ namespace Core { +NonnullRefPtr<ConfigFile> ConfigFile::get_for_lib(const String& lib_name) +{ + String directory = StandardPaths::config_directory(); + auto path = String::format("%s/lib/%s.ini", directory.characters(), lib_name.characters()); + + return adopt(*new ConfigFile(path)); +} + NonnullRefPtr<ConfigFile> ConfigFile::get_for_app(const String& app_name) { String directory = StandardPaths::config_directory(); |