public function chown($uid, $gid = -1, $cb = null, $pri = EIO_PRI_DEFAULT)
    {
        $cb = CallbackWrapper::forceWrap($cb);
        if (!$this->fd) {
            if ($cb) {
                $cb($this, false);
            }
            return false;
        }
        if (!FileSystem::$supported) {
            $r = chown($this->path, $uid);
            if ($gid !== -1) {
                $r = $r && chgrp($this->path, $gid);
            }
            if ($cb) {
                $cb($this, $r);
            }
            return false;
        }
        return eio_fchown($this->fd, $uid, $gid, $pri, $cb, $this);
    }
public function chown($uid, $gid = -1, $cb = null, $pri = EIO_PRI_DEFAULT)
    {
        $cb = CallbackWrapper::forceWrap($cb);
        if (!$this->fd) {
            if ($cb) {
                $cb($this, false);
            }
            return false;
        }
        if (!FileSystem::$supported) {
            $r = chown($this->path, $uid);
            if ($gid !== -1) {
                $r = $r && chgrp($this->path, $gid);
            }
            if ($cb) {
                $cb($this, $r);
            }
            return false;
        }
        return eio_fchown($this->fd, $uid, $gid, $pri, $cb, $this);
    }
public function chown ( $ uid , $ gid = - 1 , $ cb = null , $ pri = EIO_PRI_DEFAULT ) { $ cb = CallbackWrapper :: forceWrap ( $ cb ) ; if ( ! $ this -> fd ) { if ( $ cb ) { $ cb ( $ this , false ) ; } return false ; } if ( ! FileSystem :: $ supported ) { $ r = chown ( $ this -> path , $ uid ) ; if ( $ gid !== - 1 ) { $ r = $ r && chgrp ( $ this -> path , $ gid ) ; } if ( $ cb ) { $ cb ( $ this , $ r ) ; } return false ; } return eio_fchown ( $ this -> fd , $ uid , $ gid , $ pri , $ cb , $ this ) ; }
Changes ownership of this file
@param  integer $uid User ID
@param  integer $gid Group ID
@param  callable $cb = null Callback
@param  integer $pri = EIO_PRI_DEFAULT Priority
@return resource|false
Changes ownership of this file