MCPcopy Index your code
hub / github.com/ether/etherpad / saveState

Function saveState

src/node/updater/state.ts:151–156  ·  view source on GitHub ↗
(filePath: string, state: UpdateState)

Source from the content-addressed store, hash-verified

149
150/** Atomic write via tmp-then-rename. Creates parent directories as needed. */
151export const saveState = async (filePath: string, state: UpdateState): Promise<void> => {
152 await fs.mkdir(path.dirname(filePath), {recursive: true});
153 const tmp = `${filePath}.tmp`;
154 await fs.writeFile(tmp, JSON.stringify(state, null, 2));
155 await fs.rename(tmp, filePath);
156};

Callers 12

updateStatus.tsFile · 0.90
updateActions.tsFile · 0.90
state.test.tsFile · 0.90
performCheckFunction · 0.90
getRollbackDepsFunction · 0.90
buildSchedulerApplyDepsFunction · 0.90
notifyApplyFailureFunction · 0.90
schedulerTriggerApplyFunction · 0.90
expressCreateServerFunction · 0.90
expressCreateServerFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected