sync forces "dirty" (modified) filesystem buffers to be written to disk.
On success, zero is returned. On error, -1 is returned and errno is set. Stdlib.GetLastError can be called to obtain the translated error.
The filesystem buffer cache is generally write-behind, for best performance. But since the cache is not persistent, it should be flushed periodically. A sync() call is issued by the update daemon periodically.
Namespace: Mono.Unix.Native
Assembly: Mono.Posix (in Mono.Posix.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0