()
| 687 | } |
| 688 | |
| 689 | writeMetadata() { |
| 690 | const text = JSON.stringify(this.metadata, null, 2); |
| 691 | const write = async () => { |
| 692 | await this.persistenceKaos.mkdir(this.options.homedir, { parents: true, existOk: true }); |
| 693 | await this.persistenceKaos.writeText(this.metadataPath, text); |
| 694 | }; |
| 695 | this.writeMetadataPromise = this.writeMetadataPromise.then(write, write); |
| 696 | return this.writeMetadataPromise; |
| 697 | } |
| 698 | |
| 699 | async readMetadata() { |
| 700 | const text = await this.persistenceKaos.readText(this.metadataPath); |
no outgoing calls
no test coverage detected