You are here

protected function InPlaceUpdate::stripFileDirectoryPath in Automatic Updates 8

Remove the files directory path from files from the archive.

Parameters

string $file: The file path.

Return value

bool TRUE if path was removed, else FALSE.

2 calls to InPlaceUpdate::stripFileDirectoryPath()
InPlaceUpdate::backup in src/Services/InPlaceUpdate.php
Backup before an update.
InPlaceUpdate::checkModifiedFiles in src/Services/InPlaceUpdate.php
Check if files are modified before applying updates.

File

src/Services/InPlaceUpdate.php, line 412

Class

InPlaceUpdate
Class to apply in-place updates.

Namespace

Drupal\automatic_updates\Services

Code

protected function stripFileDirectoryPath(&$file) {
  if (strpos($file, self::ARCHIVE_DIRECTORY) === 0) {
    $file = substr($file, 6);
    return TRUE;
  }
  return FALSE;
}