function getFilelist($preserve = false)
    {
        if (isset($this->_packageInfo['filelist']) && !$preserve) {
            return $this->_packageInfo['filelist'];
        }
        $this->flattenFilelist();
        if ($contents = $this->getContents()) {
            $ret = array();
            if (!isset($contents['dir'])) {
                return false;
            }
            if (!isset($contents['dir']['file'][0])) {
                $contents['dir']['file'] = array($contents['dir']['file']);
            }
            foreach ($contents['dir']['file'] as $file) {
                $name = $file['attribs']['name'];
                if (!$preserve) {
                    $file = $file['attribs'];
                }
                $ret[$name] = $file;
            }
            if (!$preserve) {
                $this->_packageInfo['filelist'] = $ret;
            }
            return $ret;
        }
        return false;
    }
function getFilelist($preserve = false)
    {
        if (isset($this->_packageInfo['filelist']) && !$preserve) {
            return $this->_packageInfo['filelist'];
        }
        $this->flattenFilelist();
        if ($contents = $this->getContents()) {
            $ret = array();
            if (!isset($contents['dir'])) {
                return false;
            }
            if (!isset($contents['dir']['file'][0])) {
                $contents['dir']['file'] = array($contents['dir']['file']);
            }
            foreach ($contents['dir']['file'] as $file) {
                $name = $file['attribs']['name'];
                if (!$preserve) {
                    $file = $file['attribs'];
                }
                $ret[$name] = $file;
            }
            if (!$preserve) {
                $this->_packageInfo['filelist'] = $ret;
            }
            return $ret;
        }
        return false;
    }
function getFilelist ( $ preserve = false ) { if ( isset ( $ this -> _packageInfo [ 'filelist' ] ) && ! $ preserve ) { return $ this -> _packageInfo [ 'filelist' ] ; } $ this -> flattenFilelist ( ) ; if ( $ contents = $ this -> getContents ( ) ) { $ ret = array ( ) ; if ( ! isset ( $ contents [ 'dir' ] ) ) { return false ; } if ( ! isset ( $ contents [ 'dir' ] [ 'file' ] [ 0 ] ) ) { $ contents [ 'dir' ] [ 'file' ] = array ( $ contents [ 'dir' ] [ 'file' ] ) ; } foreach ( $ contents [ 'dir' ] [ 'file' ] as $ file ) { $ name = $ file [ 'attribs' ] [ 'name' ] ; if ( ! $ preserve ) { $ file = $ file [ 'attribs' ] ; } $ ret [ $ name ] = $ file ; } if ( ! $ preserve ) { $ this -> _packageInfo [ 'filelist' ] = $ ret ; } return $ ret ; } return false ; }
This should only be used to retrieve filenames and install attributes
This should only be used to retrieve filenames and install attributes