/opt/alt/php55/usr/share/pear/ezc/Archive/tar/headers
Edit: /opt/alt/php55/usr/share/pear/ezc/Archive/tar/headers/gnu.php (3694B)
type )
{
case "L":
$extensions["fileName"] = $this->readExtension( $file );
break;
case "K":
$extensions["linkName"] = $this->readExtension( $file );
break;
}
} while ( $this->type < '0' || $this->type > '9' );
parent::__construct( $file );
foreach ( $extensions as $key => $value )
{
switch ( $key )
{
case "fileName":
$this->fileName = $extensions["fileName"];
$this->filePrefix = "";
break;
case "linkName":
$this->linkName = $extensions["linkName"];
break;
}
}
}
}
/**
* Reads an extended set of data from the Block file and returns it as a string.
*
* Some filenames or link names do not fit in the Ustar header, and are therefor placed in a new block.
* This method read the block(s) and returns the data as a string.
*
* @param ezcArchiveBlockFile $file
* @return string
*/
protected function readExtension( ezcArchiveBlockFile $file )
{
$completeBlocks = ( int ) ( $this->fileSize / self::BLOCK_SIZE );
$rest = ( $this->fileSize % self::BLOCK_SIZE );
$data = "";
for ( $i = 0; $i < $completeBlocks; $i++ )
{
$data .= $file->next();
}
$data .= substr( $file->next(), 0, $rest );
$file->next();
return $data;
}
}
?>