You are here

public function DeployManager::compressContent in Default Content Deploy 8

Compress the content files to an archive.

Return value

$this

File

src/DeployManager.php, line 164

Class

DeployManager

Namespace

Drupal\default_content_deploy

Code

public function compressContent() {
  $folder = $this->fileSystem
    ->getTempDirectory() . '/dcd';
  $content_folder = $folder . '/content';

  // Remove old archive.
  $this->fileSystem
    ->deleteRecursive($folder . '/content.tar.gz');
  $archive = new ArchiveTar($folder . '/content.tar.gz', 'gz');
  $archive
    ->addModify($content_folder, basename($content_folder), $content_folder);
  return $this;
}