dosfsync
Purpose
Synchronizes a specified DOS file.
Library
DOS Services Library (libdos.a)
Syntax
#include <dos.h>
int dosfsync (dosfile)
DOSFILE dosfile;
Description
The dosfsync subroutine guarantees that any changes to
the file specified by the dosfile parameter has been
written to the device on which the file exists when the
subroutine returns. The use of the dosfsync subroutine
has no detectable effect in a single process that runs to
completion. It is useful in multi-processing applica-
tions and as a form of backup.
The dosfile parameter is an open file descriptor that was
obtained from a dosopen, doscreate, or dosdup subroutine.
Return Value
Upon successful completion, a value of 0 is returned. If
the dosfsync subroutine fails, a value of -1 is returned
and doserrno is set to indicate the error.
Related Information
In this book: "DOS services library," "doscreate,"
"dosdup," "dosopen," "doswrite," and "fsync."