(PECL eio >= 0.0.1dev)
eio_sync_file_range — Sync a file segment with disk
$fd,$offset,$nbytes,$flags,$pri = EIO_PRI_DEFAULT,$callback = NULL,$data = NULL
eio_sync_file_range() permits fine control when synchronizing the open file referred to by the file
descriptor fd with disk.
fdoffsetnbytesnbytes is zero, then all bytes from offset through
to the end of file are synchronized.
flagsEIO_SYNC_FILE_RANGE_WAIT_BEFORE,
EIO_SYNC_FILE_RANGE_WRITE,
EIO_SYNC_FILE_RANGE_WAIT_AFTER. These flags have
the same meaning as their SYNC_FILE_RANGE_*
counterparts(see SYNC_FILE_RANGE(2) man page).
priEIO_PRI_DEFAULT,EIO_PRI_MIN,EIO_PRI_MAX 或 null。如果是
null,pri 将设为
EIO_PRI_DEFAULT。
callback
callback
函数在请求完成时被调用。其应匹配一下原型:
void callback(mixed $data, int $result[, resource $req]);dataresultreqdatacallback.
eio_sync_file_range() returns request resource on success, 或者在失败时返回 false.