mirror of
https://github.com/k4yt3x/video2x.git
synced 2024-12-28 23:19:11 +00:00
f8dcad3aef
* chore(libvideo2x)!: replace the C API with C++ API * fix: convert wide string to u8 for av_opt_set * style: removed unnecessary enum and struct specifiers Signed-off-by: k4yt3x <i@k4yt3x.com>
34 lines
678 B
C++
34 lines
678 B
C++
#ifndef FSUTILS_H
|
|
#define FSUTILS_H
|
|
|
|
#include <filesystem>
|
|
#include <string>
|
|
|
|
#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
|
|
|
|
bool filepath_is_readable(const std::filesystem::path &path);
|
|
|
|
std::filesystem::path find_resource_file(const std::filesystem::path &path);
|
|
|
|
std::string path_to_u8string(const std::filesystem::path &path);
|
|
|
|
std::string wstring_to_u8string(const StringType &wstr);
|
|
|
|
StringType path_to_string_type(const std::filesystem::path &path);
|
|
|
|
StringType to_string_type(int value);
|
|
|
|
#endif // FSUTILS_H
|