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

Method deleteSnapshot

src/FileRise/Domain/DiskUsageModel.php:187–194  ·  view source on GitHub ↗

* Delete the on-disk snapshot JSON, if present. */

(string $sourceId = '')

Source from the content-addressed store, hash-verified

185 * Delete the on-disk snapshot JSON, if present.
186 */
187 public static function deleteSnapshot(string $sourceId = ''): bool
188 {
189 $path = self::snapshotPath($sourceId);
190 if (!is_file($path)) {
191 return false;
192 }
193 return @unlink($path);
194 }
195
196 /**
197 * Absolute path to the snapshot JSON file.

Callers 1

Calls 1

snapshotPathMethod · 0.95

Tested by

no test coverage detected