public static function genPathHash($path)
{
if (DIRECTORY_SEPARATOR != '/') {
$path = str_replace('/', DIRECTORY_SEPARATOR, $path);
}
if (preg_match('/^@(\\d+)/', $path, $match)) {
$volume = $match[1];
$path = ltrim(substr($path, strlen($match[0])), DIRECTORY_SEPARATOR);
if (empty($path)) {
$path = DIRECTORY_SEPARATOR;
}
} else {
$volume = 1;
}
$hash = rtrim(strtr(base64_encode($path), '+/=', '-_.'), '.');
return 'elf_fls' . $volume . '_' . $hash;
}