You are here

protected function InPlaceUpdate::getTempDirectory in Automatic Updates 8

Provides the temporary extraction directory.

Return value

string The temporary directory.

4 calls to InPlaceUpdate::getTempDirectory()
InPlaceUpdate::backup in src/Services/InPlaceUpdate.php
Backup before an update.
InPlaceUpdate::getDeletions in src/Services/InPlaceUpdate.php
Get an iterator of files to delete.
InPlaceUpdate::processUpdate in src/Services/InPlaceUpdate.php
Process update.
InPlaceUpdate::rollback in src/Services/InPlaceUpdate.php
Rollback after a failed update.

File

src/Services/InPlaceUpdate.php, line 593

Class

InPlaceUpdate
Class to apply in-place updates.

Namespace

Drupal\automatic_updates\Services

Code

protected function getTempDirectory() {
  if (!$this->tempDirectory) {
    $this->tempDirectory = $this->fileSystem
      ->createFilename('automatic_updates-update', FileSystem::getOsTemporaryDirectory());
    $this->fileSystem
      ->prepareDirectory($this->tempDirectory, FileSystemInterface::CREATE_DIRECTORY);
    $this->tempDirectory .= DIRECTORY_SEPARATOR;
  }
  return $this->tempDirectory;
}