encode
Encodes the given value to the file. If the value is null, the file is deleted. If the encoding fails, the temp file is deleted. If the encoding succeeds, the temp file is atomically moved to the target file - completing the transaction.
Parameters
value
optional value to encode