(string $metaRoot, string $folder)
| 16 | } |
| 17 | |
| 18 | public static function path(string $metaRoot, string $folder): string |
| 19 | { |
| 20 | $metaRoot = rtrim($metaRoot, '/\\') . DIRECTORY_SEPARATOR; |
| 21 | $folder = self::folderKey($folder); |
| 22 | |
| 23 | if ($folder === 'root') { |
| 24 | return $metaRoot . self::ROOT_FILE; |
| 25 | } |
| 26 | |
| 27 | $legacyPath = $metaRoot . self::legacyFileName($folder); |
| 28 | if (!self::isCollisionSensitive($folder)) { |
| 29 | return $legacyPath; |
| 30 | } |
| 31 | |
| 32 | $encodedPath = $metaRoot . self::encodedFileName($folder); |
| 33 | if (!is_file($encodedPath) && is_file($legacyPath)) { |
| 34 | self::copyLegacyMetadata($legacyPath, $encodedPath); |
| 35 | } |
| 36 | |
| 37 | return $encodedPath; |
| 38 | } |
| 39 | |
| 40 | public static function encodedFileName(string $folder): string |
| 41 | { |
nothing calls this directly
no test coverage detected