mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 08:38:12 +00:00
LibCore: Add CConfigFile::open() for opening an arbitrary INI file
This commit is contained in:
parent
11fd7aed2a
commit
37329f829b
2 changed files with 6 additions and 0 deletions
|
@ -21,6 +21,11 @@ NonnullRefPtr<CConfigFile> CConfigFile::get_for_system(const String& app_name)
|
||||||
return adopt(*new CConfigFile(path));
|
return adopt(*new CConfigFile(path));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
NonnullRefPtr<CConfigFile> CConfigFile::open(const String& path)
|
||||||
|
{
|
||||||
|
return adopt(*new CConfigFile(path));
|
||||||
|
}
|
||||||
|
|
||||||
CConfigFile::CConfigFile(const String& file_name)
|
CConfigFile::CConfigFile(const String& file_name)
|
||||||
: m_file_name(file_name)
|
: m_file_name(file_name)
|
||||||
{
|
{
|
||||||
|
|
|
@ -11,6 +11,7 @@ class CConfigFile : public RefCounted<CConfigFile> {
|
||||||
public:
|
public:
|
||||||
static NonnullRefPtr<CConfigFile> get_for_app(const String& app_name);
|
static NonnullRefPtr<CConfigFile> get_for_app(const String& app_name);
|
||||||
static NonnullRefPtr<CConfigFile> get_for_system(const String& app_name);
|
static NonnullRefPtr<CConfigFile> get_for_system(const String& app_name);
|
||||||
|
static NonnullRefPtr<CConfigFile> open(const String& path);
|
||||||
~CConfigFile();
|
~CConfigFile();
|
||||||
|
|
||||||
bool has_group(const String&) const;
|
bool has_group(const String&) const;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue