MCPcopy Create free account
hub / github.com/error311/FileRise / snapshotPath

Method snapshotPath

src/FileRise/Domain/DiskUsageModel.php:199–205  ·  view source on GitHub ↗

* Absolute path to the snapshot JSON file. */

(string $sourceId = '')

Source from the content-addressed store, hash-verified

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.

Callers 5

deleteSnapshotMethod · 0.95
buildSnapshotMethod · 0.95
loadSnapshotMethod · 0.95
deleteSnapshotMethod · 0.80

Calls 1

resolveSourceContextMethod · 0.95

Tested by

no test coverage detected