public extractInString ( string $p_filename ) : a | ||
$p_filename | string | The path of the file to extract in a string. |
Результат | a | string with the file content or NULL. |
function extractInString($p_filename)
{
if ($this->_openRead()) {
$v_result = $this->_extractInString($p_filename);
$this->_close();
} else {
$v_result = NULL;
}
return $v_result;
}
function testBz2() { $oTar = new Archive_Tar($this->sFileBz2, 'bz2'); $sExpected = $oTar->extractInString('Beautifier.php'); unset($oTar); $sActual = file_get_contents('tarz://' . $this->sFileBz2 . "#Beautifier.php"); $this->assertTrue($sExpected == $sActual, 'file_get_contents'); }