Function writeBinarySafe

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

Write binary data to a file. Unlike the regular writeBinary, 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