Route prepared file targets through platform services
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user