Archive_Tar::listContent PHP Method

listContent() public method

{{{ listContent()
public listContent ( )
    function listContent()
    {
        $v_list_detail = array();
        if ($this->_openRead()) {
            if (!$this->_extractList('', $v_list_detail, "list", '', '')) {
                unset($v_list_detail);
                $v_list_detail = 0;
            }
            $this->_close();
        }
        return $v_list_detail;
    }

Usage Example

示例#1
0
 /**
  * Method to return a listing of the contents of an archived file
  *
  * @param  boolean $full
  * @return array
  */
 public function listFiles($full = false)
 {
     $files = array();
     $list = $this->archive->listContent();
     if (!$full) {
         foreach ($list as $file) {
             $files[] = $file['filename'];
         }
     } else {
         $files = $list;
     }
     return $files;
 }
All Usage Examples Of Archive_Tar::listContent