PHP.nl

fdatasync

fdatasync

Synchronizes data (but not meta-data) to the file

bool **fdatasync** resource $stream

This function synchronizes contents to storage media, just like does, but it does not synchronize file meta-data. Note that this function is only effectively different in POSIX systems. In Windows, this function is aliased to . stream``fsync``fsync

stream

return.success

Voorbeeld: example

<?php

$file = 'test.txt';

$stream = fopen($file, 'w');
fwrite($stream, 'test data');
fwrite($stream, "\r\n");
fwrite($stream, 'additional data');

fdatasync($stream);
fclose($stream);
?>

fflush``fsync