You are here

function imagecache_actions_find_file in ImageCache Actions 7

Same name and namespace in other branches
  1. 8 utility.inc \imagecache_actions_find_file()

Looks up and returns the full path of the given file.

Parameters

string $file: A file name. We accept:

  • stream wrapper notation like: private://, public://, temporary:// and module:// (the latter provided by the system stream wrapper module).
  • relative: relative to the current directory (probably DRUPAL_ROOT).
  • absolute: as is.

Return value

string|false The full file path of the file, so the image toolkit knows exactly where it is. False if the file cannot be found or is not readable.

5 calls to imagecache_actions_find_file()
imagecache_actions_image_load in ./utility.inc
Loads the given file as an image object.
imagecache_actions_validate_file in ./utility.inc
Validates that the file as specified in the element exists and is readable.
image_effects_text_effect_inc in image_effects_text/image_effects_text.inc
Image effect callback for the text effect.
image_effects_text_validate_font in image_effects_text/image_effects_text.inc
Validates that the file as specified in the element exists and is readable.
image_imagemagick_overlay in ./image_overlay.inc
Imagemagick toolkit specific implementation of the image overlay effect.

File

./utility.inc, line 80
utility.inc: uitility form, conversion and rendering functions for image processing.

Code

function imagecache_actions_find_file($file) {
  $result = FALSE;
  if (is_readable($file)) {
    $result = drupal_realpath($file);
  }
  return $result;
}