Function writeStringSafe

#include <Geode/utils/file.hpp>geode::Result<>writeStringSafe(,)

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.

Parameters

path

Path to the file to write to

data

Data to write to the file
Return value
Result indicating success or failure
Examples0