1/* Durability for the restore's temp-file-then-rename.2 *3 * V 0.5's `os` has no fsync. A rename is only durable once the bytes it points4 * at are on disk and the folder's own entry has been synced; without both a5 * power cut can leave an empty or partial file behind with the restore mark6 * already gone. Two calls, because a file and a folder are opened the same way7 * but synced for different reasons.8 */910#ifndef KOH_FSYNC_H11#define KOH_FSYNC_H1213/* Syncs one file's contents; returns 1 on success, 0 on failure. */14int koh_fsync_file(const char *path);1516/* Syncs one folder, making renames and unlinks inside it durable. */17int koh_fsync_dir(const char *path);1819#endif