You are here

protected static function InPlaceUpdate::getFileRealPath in Automatic Updates 7

Get file real path.

Parameters

\SplFileInfo $file: The file to retrieve the real path.

Return value

string The file real path.

3 calls to InPlaceUpdate::getFileRealPath()
InPlaceUpdate::doRestore in ./InPlaceUpdate.php
Do restore.
InPlaceUpdate::processUpdate in ./InPlaceUpdate.php
Process update.
InPlaceUpdate::rollback in ./InPlaceUpdate.php
Rollback after a failed update.

File

./InPlaceUpdate.php, line 455

Class

InPlaceUpdate
Class to apply in-place updates.

Code

protected static function getFileRealPath(\SplFileInfo $file) {
  $real_path = $file
    ->getRealPath();
  if (!$real_path) {
    throw new \RuntimeException(sprintf('Could not get real path for "%s"', $file
      ->getFilename()));
  }
  return $real_path;
}