LibUnicode: Remove now-unused dir-iterator helper functions

This commit is contained in:
Sam Atkins 2023-03-15 15:38:44 +00:00 committed by Tim Flynn
parent 414cafa7f8
commit b18c1c7291
Notes: sideshowbarker 2024-07-17 00:47:29 +09:00

View file

@ -20,7 +20,6 @@
#include <AK/StringView.h>
#include <AK/Traits.h>
#include <AK/Vector.h>
#include <LibCore/DirIterator.h>
#include <LibCore/File.h>
#include <LibLocale/Locale.h>
@ -341,28 +340,6 @@ inline ErrorOr<JsonValue> read_json_file(StringView path)
return JsonValue::from_string(buffer);
}
inline ErrorOr<Core::DirIterator> path_to_dir_iterator(DeprecatedString path, StringView subpath = "main"sv)
{
LexicalPath lexical_path(move(path));
if (!subpath.is_empty())
lexical_path = lexical_path.append(subpath);
Core::DirIterator iterator(lexical_path.string(), Core::DirIterator::SkipParentAndBaseDir);
if (iterator.has_error())
return iterator.error();
return iterator;
}
inline ErrorOr<DeprecatedString> next_path_from_dir_iterator(Core::DirIterator& iterator)
{
auto next_path = iterator.next_full_path();
if (iterator.has_error())
return iterator.error();
return next_path;
}
inline void ensure_from_string_types_are_generated(SourceGenerator& generator)
{
static bool generated_from_string_types = false;