function _imagecache_strip_file_directory in ImageCache 6.2
Same name and namespace in other branches
- 5.2 imagecache.module \_imagecache_strip_file_directory()
- 5 imagecache.module \_imagecache_strip_file_directory()
Remove a possible leading file directory path from the given path.
2 calls to _imagecache_strip_file_directory()
- imagecache_create_path in ./
imagecache.module - Return a file system location that points to the location of a derivative of the original image at @p $path, transformed with the given @p $preset. Keep in mind that the image might not yet exist and won't be created.
- imagecache_create_url in ./
imagecache.module - Return a URL that points to the location of a derivative of the original image transformed with the given preset.
File
- ./
imagecache.module, line 388 - 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;
}