You are here

public static function ImagemagickEventSubscriber::removeTemporaryRemoteCopy in ImageMagick 8.3

Same name and namespace in other branches
  1. 8.2 src/EventSubscriber/ImagemagickEventSubscriber.php \Drupal\imagemagick\EventSubscriber\ImagemagickEventSubscriber::removeTemporaryRemoteCopy()

Removes a temporary file created during operations on a remote file.

Used with drupal_register_shutdown_function().

Parameters

string $path: The temporary file realpath.

File

src/EventSubscriber/ImagemagickEventSubscriber.php, line 356

Class

ImagemagickEventSubscriber
Imagemagick's module Event Subscriber.

Namespace

Drupal\imagemagick\EventSubscriber

Code

public static function removeTemporaryRemoteCopy($path) {
  if (file_exists($path)) {
    \Drupal::service('file_system')
      ->delete($path);
  }
}