<?php uv_fs_utime(uv_default_loop(), __FILE__, time(), time(), function () { echo "Finished"; }); uv_run();
/** * {@inheritdoc} */ public function touch($path) { $this->reactor->addRef(); $atime = $mtime = time(); $promisor = new Deferred(); \uv_fs_utime($this->loop, $path, $mtime, $atime, function () use($promisor) { // The uv_fs_utime() callback does not receive any args at this time $this->reactor->delRef(); $promisor->succeed(true); }); return $promisor->promise(); }