mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 15:40:19 +00:00
6e19ab2bbc
We have a new, improved string type coming up in AK (OOM aware, no null state), and while it's going to use UTF-8, the name UTF8String is a mouthful - so let's free up the String name by renaming the existing class. Making the old one have an annoying name will hopefully also help with quick adoption :^)
33 lines
753 B
C++
33 lines
753 B
C++
/*
|
|
* Copyright (c) 2022, Itamar S. <itamar8910@gmail.com>
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <AK/DeprecatedString.h>
|
|
#include <AK/StringView.h>
|
|
|
|
namespace CodeComprehension {
|
|
|
|
class FileDB {
|
|
AK_MAKE_NONCOPYABLE(FileDB);
|
|
AK_MAKE_NONMOVABLE(FileDB);
|
|
|
|
public:
|
|
virtual ~FileDB() = default;
|
|
|
|
virtual Optional<DeprecatedString> get_or_read_from_filesystem(StringView filename) const = 0;
|
|
void set_project_root(StringView project_root) { m_project_root = project_root; }
|
|
DeprecatedString const& project_root() const { return m_project_root; }
|
|
DeprecatedString to_absolute_path(StringView filename) const;
|
|
|
|
protected:
|
|
FileDB() = default;
|
|
|
|
private:
|
|
DeprecatedString m_project_root;
|
|
};
|
|
|
|
}
|