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

Method constructor

external/.scrollLibs.js:21856–21864  ·  view source on GitHub ↗
(codeAtStart, absoluteFilePath = "", fileSystem = new ScrollFileSystem({}))

Source from the content-addressed store, hash-verified

21854}
21855class ScrollFile {
21856 constructor(codeAtStart, absoluteFilePath = "", fileSystem = new ScrollFileSystem({})) {
21857 this.exists = true
21858 this.fileSystem = fileSystem
21859 this.filePath = absoluteFilePath
21860 this.codeAtStart = codeAtStart
21861 this.timestamp = 0
21862 this.scrollProgram = new fileSystem.defaultParser(undefined, absoluteFilePath)
21863 this.scrollProgram.setFile(this)
21864 }
21865 async _readCodeFromStorage() {
21866 if (this.codeAtStart !== undefined) return this // Code provided
21867 const { filePath } = this

Callers

nothing calls this directly

Calls 1

setFileMethod · 0.80

Tested by

no test coverage detected