You are here

public static function ImagemagickEventSubscriber::removeTemporaryRemoteCopy in ImageMagick 8.2

Same name and namespace in other branches
  1. 8.3 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 314

Class

ImagemagickEventSubscriber
Imagemagick's module Event Subscriber.

Namespace

Drupal\imagemagick\EventSubscriber

Code

public static function removeTemporaryRemoteCopy($path) {
  if (file_exists($path)) {
    file_unmanaged_delete($path);
  }
}