* Absolute path to the snapshot JSON file. */
(string $sourceId = '')
| 197 | * Absolute path to the snapshot JSON file. |
| 198 | */ |
| 199 | public static function snapshotPath(string $sourceId = ''): string |
| 200 | { |
| 201 | $ctx = self::resolveSourceContext($sourceId); |
| 202 | $metaRoot = $ctx['ok'] ? (string)($ctx['metaRoot'] ?? META_DIR) : (string)META_DIR; |
| 203 | $meta = rtrim($metaRoot, '/\\'); |
| 204 | return $meta . DIRECTORY_SEPARATOR . self::SNAPSHOT_BASENAME; |
| 205 | } |
| 206 | |
| 207 | /** |
| 208 | * Build a fresh snapshot of disk usage under UPLOAD_DIR and write it to disk. |
no test coverage detected