code/libraries/joomlatools/library/filesystem/stream/factory.php
public function unregisterStream($identifier)
    {
        $result = false;

        if(strpos($identifier, '.') !== false )
        {
            $identifier = $this->getIdentifier($identifier);
            $class      = $this->getObject('manager')->getClass($identifier);

            if(!$class || !array_key_exists('KFilesystemStreamInterface', class_implements($class)))
            {
                throw new UnexpectedValueException(
                    'Stream: '.$identifier.' does not implement KFilesystemStreamInterface'
                );
            }

            $name = $class::getName();

        }
        else $name = $identifier;

        if (!empty($name) && $this->isRegistered($this->_stream_prefix.$name))
        {
            if($result = stream_wrapper_unregister($this->_stream_prefix.$name)) {
                unset($this->__streams[$this->_stream_prefix.$name]);
            }
        }

        return $result;
    }
public function unregisterStream($identifier)
    {
        $result = false;

        if(strpos($identifier, '.') !== false )
        {
            $identifier = $this->getIdentifier($identifier);
            $class      = $this->getObject('manager')->getClass($identifier);

            if(!$class || !array_key_exists('KFilesystemStreamInterface', class_implements($class)))
            {
                throw new UnexpectedValueException(
                    'Stream: '.$identifier.' does not implement KFilesystemStreamInterface'
                );
            }

            $name = $class::getName();

        }
        else $name = $identifier;

        if (!empty($name) && $this->isRegistered($this->_stream_prefix.$name))
        {
            if($result = stream_wrapper_unregister($this->_stream_prefix.$name)) {
                unset($this->__streams[$this->_stream_prefix.$name]);
            }
        }

        return $result;
    }
public function unregisterStream ( $ identifier ) { $ result = false ; if ( strpos ( $ identifier , '.' ) !== false ) { $ identifier = $ this -> getIdentifier ( $ identifier ) ; $ class = $ this -> getObject ( 'manager' ) -> getClass ( $ identifier ) ; if ( ! $ class || ! array_key_exists ( 'KFilesystemStreamInterface' , class_implements ( $ class ) ) ) { throw new UnexpectedValueException ( 'Stream: ' . $ identifier . ' does not implement KFilesystemStreamInterface' ) ; } $ name = $ class :: getName ( ) ; } else $ name = $ identifier ; if ( ! empty ( $ name ) && $ this -> isRegistered ( $ this -> _stream_prefix . $ name ) ) { if ( $ result = stream_wrapper_unregister ( $ this -> _stream_prefix . $ name ) ) { unset ( $ this -> __streams [ $ this -> _stream_prefix . $ name ] ) ; } } return $ result ; }
Unregister a stream

@param string $identifier A stream object identifier string or stream name
@throws UnexpectedValueException
@return bool Returns TRUE on success, FALSE on failure.
Unregister a stream