protected static function getName($path)
{
// ['dir' => 1, 'basename' => 2, 'filename' => 3, 'extension' => 5]
preg_match('%^(.*?)[\\\\/]*(([^/\\\\]*?)(\\.([^\\.\\\\/]+?)|))[\\\\/\\.]*$%im', $path, $m);
if (!isset($m[3])) {
throw new RuntimeException('Name not found');
}
return $m[3];
}