2024-12-04 08:06:35 +00:00
|
|
|
#pragma once
|
2024-10-08 02:29:00 +00:00
|
|
|
|
|
|
|
#include <filesystem>
|
2025-01-11 00:00:00 +00:00
|
|
|
#include <optional>
|
2024-11-04 00:00:00 +00:00
|
|
|
#include <string>
|
|
|
|
|
2024-12-17 16:24:51 +00:00
|
|
|
namespace video2x {
|
|
|
|
namespace fsutils {
|
|
|
|
|
2024-12-02 07:24:30 +00:00
|
|
|
#ifdef _WIN32
|
|
|
|
typedef wchar_t CharType;
|
|
|
|
#define STR(x) L##x
|
|
|
|
#else
|
|
|
|
typedef char CharType;
|
|
|
|
#define STR(x) x
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef _WIN32
|
|
|
|
typedef std::wstring StringType;
|
|
|
|
#else
|
|
|
|
typedef std::string StringType;
|
|
|
|
#endif
|
2024-10-08 02:29:00 +00:00
|
|
|
|
2025-01-11 00:00:00 +00:00
|
|
|
bool file_is_readable(const std::filesystem::path& path);
|
2024-10-08 02:29:00 +00:00
|
|
|
|
2025-01-11 00:00:00 +00:00
|
|
|
std::optional<std::filesystem::path> find_resource(const std::filesystem::path& resource);
|
2024-10-08 02:29:00 +00:00
|
|
|
|
2024-12-31 00:00:00 +00:00
|
|
|
std::string path_to_u8string(const std::filesystem::path& path);
|
2024-11-04 00:00:00 +00:00
|
|
|
|
2024-12-31 00:00:00 +00:00
|
|
|
std::string wstring_to_u8string(const fsutils::StringType& wstr);
|
2024-12-17 16:24:51 +00:00
|
|
|
|
2024-12-31 00:00:00 +00:00
|
|
|
fsutils::StringType path_to_string_type(const std::filesystem::path& path);
|
2024-12-02 07:24:30 +00:00
|
|
|
|
2024-12-17 16:24:51 +00:00
|
|
|
fsutils::StringType to_string_type(int value);
|
2024-11-04 00:00:00 +00:00
|
|
|
|
2024-12-17 16:24:51 +00:00
|
|
|
} // namespace fsutils
|
|
|
|
} // namespace video2x
|