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

Method _formatAndSave

ScrollSetCLI.js:58–64  ·  view source on GitHub ↗
(filePath, particle)

Source from the content-addressed store, hash-verified

56 }
57
58 async _formatAndSave(filePath, particle) {
59 const fusedFile = scrollFs.newFile(particle.toString(), filePath)
60 await fusedFile.singlePassFuse()
61 // force a write
62 const result = await scrollFs.write(filePath, fusedFile.scrollProgram.formatted)
63 return result
64 }
65
66 async formatAndSave(file, particle = this.getParticle(file)) {
67 return this._formatAndSave(this.makeFilePath(file.id), particle)

Callers 2

patchAndSaveMethod · 0.95
formatAndSaveMethod · 0.95

Calls 4

newFileMethod · 0.80
singlePassFuseMethod · 0.80
toStringMethod · 0.45
writeMethod · 0.45

Tested by

no test coverage detected