Write a string to a file. Unlike the regular writeString, it first writes to a temporary file and then renames it to the target file. This ensures that if the write fails, the original file is not corrupted. Except Android where the “safe” part is disabled due to performance issues.
Function writeStringSafe
#include <Geode/utils/file.hpp>std::string_viewdata
)path
Path to the file to write to
data
Data to write to the file
Result indicating success or failure