MCPcopy Create free account
hub / github.com/Acode-Foundation/Acode / closeFile

Method closeFile

src/cm/lsp/workspace.ts:154–166  ·  view source on GitHub ↗
(uri: string, view?: EditorView)

Source from the content-addressed store, hash-verified

152 }
153
154 closeFile(uri: string, view?: EditorView): void {
155 const file = this.#getFileEntry(uri);
156 if (!file) return;
157
158 if (view && file.views.has(view)) {
159 file.views.delete(view);
160 }
161
162 if (!file.views.size) {
163 this.client.didClose(uri);
164 this.#removeFileEntry(file);
165 }
166 }
167
168 getFile(uri: string): AcodeWorkspaceFile | null {
169 return this.#getFileEntry(uri);

Callers 1

detachMethod · 0.80

Calls 3

#getFileEntryMethod · 0.95
#removeFileEntryMethod · 0.95
deleteMethod · 0.65

Tested by

no test coverage detected