hpcflow.sdk.persistence.utils.atomic_write#
- hpcflow.sdk.persistence.utils.atomic_write(path, data)#
Defensively write the provided bytes to the specified path.
This includes calling fsync on the file and its parent directory. On the Lustre file system for example, it is recommended to call flush (see https://wiki.lustre.org/Lustre_Common_Mistakes#Not_Checking_Write_Return_Codes).