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

Method copyLegacyMetadata

src/FileRise/Support/MetadataPath.php:132–143  ·  view source on GitHub ↗
(string $legacyPath, string $encodedPath)

Source from the content-addressed store, hash-verified

130 }
131
132 private static function copyLegacyMetadata(string $legacyPath, string $encodedPath): void
133 {
134 $raw = @file_get_contents($legacyPath);
135 if (!is_string($raw)) {
136 return;
137 }
138 $decoded = json_decode($raw, true);
139 if (!is_array($decoded)) {
140 return;
141 }
142 @file_put_contents($encodedPath, json_encode($decoded, JSON_PRETTY_PRINT), LOCK_EX);
143 }
144
145 /**
146 * @return list<string>

Callers 1

pathMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected