MCPcopy Create free account
hub / github.com/breck7/scroll / patchAndSave

Method patchAndSave

ScrollSetCLI.js:38–49  ·  view source on GitHub ↗
(patch)

Source from the content-addressed store, hash-verified

36 }
37
38 patchAndSave(patch) {
39 const id = patch.get("id")
40 patch.delete("id")
41 const target = this.makeFilePath(id)
42 if (!Disk.exists(target)) {
43 console.log(`No match for ${id}`)
44 return
45 }
46 console.log(`Patching ${id}`)
47 const particle = new Particle(Disk.read(target)).patch(patch)
48 return this._formatAndSave(target, particle)
49 }
50
51 async setAndSave(file, measurementPath, measurementValue) {
52 const particle = this.getParticle(file)

Callers 1

importCommandMethod · 0.95

Calls 8

makeFilePathMethod · 0.95
_formatAndSaveMethod · 0.95
logMethod · 0.80
patchMethod · 0.80
getMethod · 0.45
deleteMethod · 0.45
existsMethod · 0.45
readMethod · 0.45

Tested by

no test coverage detected