MCPcopy Index your code
hub / github.com/stackblitz/bolt.new / saveFile

Method saveFile

app/lib/stores/workbench.ts:156–170  ·  view source on GitHub ↗
(filePath: string)

Source from the content-addressed store, hash-verified

154 }
155
156 async saveFile(filePath: string) {
157 const documents = this.#editorStore.documents.get();
158 const document = documents[filePath];
159
160 if (document === undefined) {
161 return;
162 }
163
164 await this.#filesStore.saveFile(filePath, document.value);
165
166 const newUnsavedFiles = new Set(this.unsavedFiles.get());
167 newUnsavedFiles.delete(filePath);
168
169 this.unsavedFiles.set(newUnsavedFiles);
170 }
171
172 async saveCurrentDocument() {
173 const currentDocument = this.currentDocument.get();

Callers 2

saveCurrentDocumentMethod · 0.95
saveAllFilesMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected