Like fsync or fdatasync in PHP?

PHP has no specific function for fsync in the AFAIK file. However, I feel the desire for fsync logfile to which I am adding PHP.

Is there any PHP built-in function that calls fsync? Or any workaround?

+3
source share
2 answers

I am afraid that this is impossible. The only reference to fsyncthe sources is the implementation of the operation flushfor regular file system streams, and just to explicitly say that they are not synchronized, just by calling fflush.

If you really need it, you need to do it in the PHP extension.

+2
source

, fclose, , . , , .

.

0

Source: https://habr.com/ru/post/1755032/


All Articles