private function doPermChange(string $path, vfsStreamAbstractContent $content, callable $change): bool
    {
        if (!$content->isOwnedByUser(vfsStream::getCurrentUser())) {
            return false;
        }

        if (self::$root->getName() !== $path) {
            $names   = $this->splitPath($path);
            $parent = $this->getContent($names['dirname']);
            if (!$parent->isWritable(vfsStream::getCurrentUser(), vfsStream::getCurrentGroup())) {
                return false;
            }
        }

        $change();
        return true;
    }
private function doPermChange(string $path, vfsStreamAbstractContent $content, callable $change): bool
    {
        if (!$content->isOwnedByUser(vfsStream::getCurrentUser())) {
            return false;
        }

        if (self::$root->getName() !== $path) {
            $names   = $this->splitPath($path);
            $parent = $this->getContent($names['dirname']);
            if (!$parent->isWritable(vfsStream::getCurrentUser(), vfsStream::getCurrentGroup())) {
                return false;
            }
        }

        $change();
        return true;
    }
private function doPermChange ( string $ path , vfsStreamAbstractContent $ content , callable $ change ) : bool { if ( ! $ content -> isOwnedByUser ( vfsStream :: getCurrentUser ( ) ) ) { return false ; } if ( self :: $ root -> getName ( ) !== $ path ) { $ names = $ this -> splitPath ( $ path ) ; $ parent = $ this -> getContent ( $ names [ 'dirname' ] ) ; if ( ! $ parent -> isWritable ( vfsStream :: getCurrentUser ( ) , vfsStream :: getCurrentGroup ( ) ) ) { return false ; } } $ change ( ) ; return true ; }
executes given permission change when necessary rights allow such a change

@param   string                    $path
@param   vfsStreamAbstractContent  $content
@param   callable                  $change
@return  bool
executes given permission change when necessary rights allow such a change