MCPcopy Index your code
hub / github.com/coder/code-server / write

Method write

src/node/settings.ts:33–41  ·  view source on GitHub ↗

* Write settings combined with current settings. On failure log a warning. * Settings will be merged shallowly.

(settings: Partial<T>)

Source from the content-addressed store, hash-verified

31 * Settings will be merged shallowly.
32 */
33 public async write(settings: Partial<T>): Promise<void> {
34 try {
35 const oldSettings = await this.read()
36 const nextSettings = { ...oldSettings, ...settings }
37 await fs.writeFile(this.settingsPath, JSON.stringify(nextSettings, null, 2))
38 } catch (error: any) {
39 logger.warn(error.message)
40 }
41 }
42}
43
44export interface UpdateSettings {

Callers 12

writeFunction · 0.80
update.test.tsFile · 0.80
settings.test.tsFile · 0.80
socket.test.tsFile · 0.80
util.test.tsFile · 0.80
addSessionMethod · 0.80
createProxyMethod · 0.80
_startMethod · 0.80
_getUpdateMethod · 0.80
openInExistingInstanceFunction · 0.80
vscode.tsFile · 0.80
initializeMethod · 0.80

Calls 1

readMethod · 0.95

Tested by

no test coverage detected