LeviLamina
Loading...
Searching...
No Matches
FileUtils.h
1#pragma once
2
3#include <filesystem>
4#include <fstream>
5#include <functional>
6#include <optional>
7#include <string>
8#include <vector>
9
10#include "ll/api/base/Macro.h"
11#include "ll/api/data/Version.h"
12
13namespace ll::inline utils::file_utils {
14
15LLNDAPI std::filesystem::path u8path(std::string_view src);
16
17LLNDAPI std::optional<std::string> readFile(std::filesystem::path const& filePath, bool isBinary = false);
18
19LLAPI bool writeFile(std::filesystem::path const& filePath, std::string_view content, bool isBinary = false);
20
23LLNDAPI std::optional<data::Version> getVersion(std::filesystem::path const& filePath);
24
25} // namespace ll::inline utils::file_utils