function _filefield_paths_strip_path in File (Field) Paths 6
Same name and namespace in other branches
- 5 filefield_paths.module \_filefield_paths_strip_path()
1 call to _filefield_paths_strip_path()
- filefield_paths_file_move in ./
filefield_paths.module - Move file and update its database record.
File
- ./
filefield_paths.module, line 754 - Contains core functions for the FileField Paths module.
Code
function _filefield_paths_strip_path($path) {
$dirpath = file_directory_path();
$dirlen = drupal_strlen($dirpath);
if (drupal_substr($path, 0, $dirlen + 1) == "{$dirpath}/") {
$path = drupal_substr($path, $dirlen + 1);
}
return $path;
}