You are here

function _imagecache_strip_file_directory in ImageCache 5

Same name and namespace in other branches
  1. 5.2 imagecache.module \_imagecache_strip_file_directory()
  2. 6.2 imagecache.module \_imagecache_strip_file_directory()

Remove a possible leading file directory path from the given path.

1 call to _imagecache_strip_file_directory()
imagecache_cache in ./imagecache.module

File

./imagecache.module, line 220
Dynamic image resizer and image cacher.

Code

function _imagecache_strip_file_directory($path) {
  $dirpath = file_directory_path();
  $dirlen = strlen($dirpath);
  if (substr($path, 0, $dirlen + 1) == $dirpath . '/') {
    $path = substr($path, $dirlen + 1);
  }
  return $path;
}