pub unsafe extern "C" fn svn_io_write_atomic2(
final_path: *const c_char,
buf: *const c_void,
nbytes: apr_size_t,
copy_perms_path: *const c_char,
flush_to_disk: svn_boolean_t,
scratch_pool: *mut apr_pool_t,
) -> *mut svn_error_t
Expand description
Writes @a nbytes bytes from @a *buf to a temporary file inside the same directory as @a *final_path. Then syncs the temporary file to disk and closes the file. After this rename the temporary file to @a final_path, possibly replacing an existing file.
If @a copy_perms_path is not NULL, copy the permissions applied on @a @a copy_perms_path on the temporary file before renaming.
If @a flush_to_disk is non-zero, do not return until the node has actually been written on the disk.
@note The flush to disk operation can be very expensive on systems that implement flushing on all IO layers, like Windows. Please use @a flush_to_disk flag only for critical data.
@since New in 1.10.