/** * touch() * @param string $path Path * @param integer $mtime Last modification time * @param integer $atime Last access time * @param callable $cb Callback * @param integer $pri Priority * @return resource|boolean */ public static function touch($path, $mtime, $atime = null, $cb = null, $pri = EIO_PRI_DEFAULT) { $cb = CallbackWrapper::forceWrap($cb); if (!FileSystem::$supported) { $r = touch($path, $mtime, $atime); if ($cb) { call_user_func($cb, $r); } return $r; } return eio_utime($path, $atime, $mtime, $pri, $cb, $path); }
/** * {@inheritdoc} */ public function touch($path) { $atime = $mtime = time(); $promisor = new Deferred(); $priority = \EIO_PRI_DEFAULT; \eio_utime($path, $atime, $mtime, $priority, [$this, "onGenericResult"], $promisor); return $promisor->promise(); }
public static function touch($path, $mtime, $atime = null, $cb = null, $pri = EIO_PRI_DEFAULT) { if (!FS::$supported) { $r = touch($path, $mtime, $atime); if ($cb) { call_user_func($cb, $r); } return; } return eio_utime($path, $atime, $mtime, $pri, $cb, $path); }