You are here

public function ArchiveTar::_cleanFile 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::_cleanFile()

Return value

bool

1 call to ArchiveTar::_cleanFile()
ArchiveTar::createModify in core/lib/Drupal/Core/Archiver/ArchiveTar.php
This method creates the archive file and add the files / directories that are listed in $p_filelist. If the file already exists and is writable, it is replaced by the new tar. It is a create and not an add. If the file exists and is read-only or is a…

File

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

Class

ArchiveTar

Namespace

Drupal\Core\Archiver

Code

public function _cleanFile() {
  $this
    ->_close();

  // ----- Look for a local copy
  if ($this->_temp_tarname != '') {

    // ----- Remove the local copy but not the remote tarname
    @drupal_unlink($this->_temp_tarname);
    $this->_temp_tarname = '';
  }
  else {

    // ----- Remove the local tarname file
    @drupal_unlink($this->_tarname);
  }
  $this->_tarname = '';
  return true;
}