mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 18:27:35 +00:00
LibCore: Move Stream-based file into the Core
namespace
This commit is contained in:
parent
a96339b72b
commit
606a3982f3
218 changed files with 748 additions and 643 deletions
|
@ -14,6 +14,7 @@
|
|||
#include <AK/RefCounted.h>
|
||||
#include <AK/RefPtr.h>
|
||||
#include <AK/Vector.h>
|
||||
#include <LibCore/File.h>
|
||||
#include <LibCore/Stream.h>
|
||||
|
||||
namespace Core {
|
||||
|
@ -30,7 +31,7 @@ public:
|
|||
static ErrorOr<NonnullRefPtr<ConfigFile>> open_for_system(DeprecatedString const& app_name, AllowWriting = AllowWriting::No);
|
||||
static ErrorOr<NonnullRefPtr<ConfigFile>> open(DeprecatedString const& filename, AllowWriting = AllowWriting::No);
|
||||
static ErrorOr<NonnullRefPtr<ConfigFile>> open(DeprecatedString const& filename, int fd);
|
||||
static ErrorOr<NonnullRefPtr<ConfigFile>> open(DeprecatedString const& filename, NonnullOwnPtr<Core::Stream::File>);
|
||||
static ErrorOr<NonnullRefPtr<ConfigFile>> open(DeprecatedString const& filename, NonnullOwnPtr<Core::File>);
|
||||
~ConfigFile();
|
||||
|
||||
bool has_group(DeprecatedString const&) const;
|
||||
|
@ -78,12 +79,12 @@ public:
|
|||
DeprecatedString const& filename() const { return m_filename; }
|
||||
|
||||
private:
|
||||
ConfigFile(DeprecatedString const& filename, OwnPtr<Stream::BufferedFile> open_file);
|
||||
ConfigFile(DeprecatedString const& filename, OwnPtr<BufferedFile> open_file);
|
||||
|
||||
ErrorOr<void> reparse();
|
||||
|
||||
DeprecatedString m_filename;
|
||||
OwnPtr<Stream::BufferedFile> m_file;
|
||||
OwnPtr<BufferedFile> m_file;
|
||||
HashMap<DeprecatedString, HashMap<DeprecatedString, DeprecatedString>> m_groups;
|
||||
bool m_dirty { false };
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue