mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-06 16:19:40 +00:00
This is only used for finding font directories for now, but having a convenient function for it means if anyone needs to use XDG_DATA_DIRS in future, they're less likely to implement it themselves and miss the case of it being present but empty. We also now canonicalize the data directory paths, as we do for the other standard paths.
32 lines
880 B
C++
32 lines
880 B
C++
/*
|
|
* Copyright (c) 2020, Andreas Kling <kling@serenityos.org>
|
|
* Copyright (c) 2023, Linus Groh <linusg@serenityos.org>
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <AK/Error.h>
|
|
#include <AK/Forward.h>
|
|
|
|
namespace Core {
|
|
|
|
class StandardPaths {
|
|
public:
|
|
static ByteString home_directory();
|
|
static ByteString desktop_directory();
|
|
static ByteString documents_directory();
|
|
static ByteString downloads_directory();
|
|
static ByteString music_directory();
|
|
static ByteString pictures_directory();
|
|
static ByteString videos_directory();
|
|
static ByteString tempfile_directory();
|
|
static ByteString config_directory();
|
|
static ByteString user_data_directory();
|
|
static Vector<ByteString> system_data_directories();
|
|
static ErrorOr<ByteString> runtime_directory();
|
|
static ErrorOr<Vector<String>> font_directories();
|
|
};
|
|
|
|
}
|