Route prepared file targets through platform services

This commit is contained in:
2026-06-04 16:58:05 +02:00
parent dc369c89b0
commit cabfa44729
9 changed files with 122 additions and 25 deletions

View File

@@ -431,6 +431,34 @@ public:
#endif
}
[[nodiscard]] pp::platform::PreparedFileTarget prepare_writable_file(
std::string_view type,
std::string_view default_name,
std::string_view data_path,
std::string_view temporary_path) override
{
const std::string name = std::string(default_name) + "." + std::string(type);
#ifdef __IOS__
(void)data_path;
return {
std::string(temporary_path) + "/" + name,
name,
true,
};
#elif __WEB__
(void)temporary_path;
return {
std::string(data_path) + "/" + name,
name,
false,
};
#else
(void)data_path;
(void)temporary_path;
return {};
#endif
}
void display_file(std::string_view path) override
{
const std::string value(path);