| 21854 | } |
| 21855 | class 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 |