Exemplo n.º 1
0
 /**
  * touch()
  * @param  integer $mtime Last modification time
  * @param  integer $atime Last access time
  * @param  callable $cb Callback
  * @param  integer $pri Priority
  * @return resource|false
  */
 public function touch($mtime, $atime = null, $cb = null, $pri = EIO_PRI_DEFAULT)
 {
     $cb = CallbackWrapper::forceWrap($cb);
     if (!$this->fd) {
         if ($cb) {
             $cb($this, false);
         }
         return false;
     }
     if (!FileSystem::$supported) {
         $r = touch($this->path, $mtime, $atime);
         if ($cb) {
             $cb($this, $r);
         }
         return false;
     }
     return eio_futime($this->fd, $atime, $mtime, $pri, $cb, $this);
 }
Exemplo n.º 2
0
 public function touch($mtime, $atime = null, $cb = null, $pri = EIO_PRI_DEFAULT)
 {
     if (!FS::$supported) {
         $r = touch($this->path, $mtime, $atime);
         if ($cb) {
             call_user_func($cb, $this, $r);
         }
         return;
     }
     eio_futime($this->fd, $atime, $mtime, $pri, $cb, $this);
 }