You are here

function remote_stream_wrapper_image_path_flush in Remote Stream Wrapper 7

1 call to remote_stream_wrapper_image_path_flush()
remote_stream_wrapper_file_delete in ./remote_stream_wrapper.module
Implements hook_file_delete().

File

./remote_stream_wrapper.module, line 321
Provides a remote stream wrapper and file field integration.

Code

function remote_stream_wrapper_image_path_flush($path) {
  $styles = image_styles();
  foreach ($styles as $style) {
    $image_path = remote_stream_wrapper_image_style_path($style['name'], $path);
    if (file_exists($image_path)) {
      file_unmanaged_delete($image_path);
    }
  }
}