PHPDaemon\FS\FileSystem::chown PHP Method

chown() public static method

Changes ownership of file/directory
public static chown ( string $path, integer $uid, integer $gid, callable $cb = null, integer $pri = EIO_PRI_DEFAULT ) : resource | boolean
$path string Path
$uid integer User ID
$gid integer Group ID
$cb callable = null Callback
$pri integer = EIO_PRI_DEFAULT Priority
return resource | boolean
    public static function chown($path, $uid, $gid = -1, $cb = null, $pri = EIO_PRI_DEFAULT)
    {
        $cb = CallbackWrapper::forceWrap($cb);
        if (!FileSystem::$supported) {
            $r = chown($path, $uid);
            if ($gid !== -1) {
                $r = $r && chgrp($path, $gid);
            }
            $cb($path, $r);
            return $r;
        }
        return eio_chown($path, $uid, $gid, $pri, $cb, $path);
    }