You are here

public function ArchiveTar::extractInString in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/lib/Drupal/Core/Archiver/ArchiveTar.php \Drupal\Core\Archiver\ArchiveTar::extractInString()

This method extract from the archive one file identified by $p_filename. The return value is a string with the file content, or NULL on error.

Parameters

string $p_filename The path of the file to extract in a string.:

Return value

a string with the file content or NULL.

File

core/lib/Drupal/Core/Archiver/ArchiveTar.php, line 636

Class

ArchiveTar

Namespace

Drupal\Core\Archiver

Code

public function extractInString($p_filename) {
  if ($this
    ->_openRead()) {
    $v_result = $this
      ->_extractInString($p_filename);
    $this
      ->_close();
  }
  else {
    $v_result = null;
  }
  return $v_result;
}