public function FilebrowserValidator::safeDirName in Filebrowser 3.x
Same name and namespace in other branches
- 8.2 src/Services/FilebrowserValidator.php \Drupal\filebrowser\Services\FilebrowserValidator::safeDirName()
File
- src/
Services/ FilebrowserValidator.php, line 62
Class
Namespace
Drupal\filebrowser\ServicesCode
public function safeDirName($path) {
$path = rtrim($path, '/');
$path = explode('/', $path);
array_pop($path);
$result = implode("/", $path);
if ($result == '') {
return '/';
}
return $result;
}