MCPcopy Create free account
hub / github.com/decaporg/decap-cms / writeFile

Function writeFile

packages/decap-server/src/middlewares/utils/fs.ts:35–38  ·  view source on GitHub ↗
(filePath: string, content: Buffer | string)

Source from the content-addressed store, hash-verified

33}
34
35export async function writeFile(filePath: string, content: Buffer | string) {
36 await fs.mkdir(path.dirname(filePath), { recursive: true });
37 await fs.writeFile(filePath, content);
38}
39
40export async function deleteFile(repoPath: string, filePath: string) {
41 await fs.unlink(path.join(repoPath, filePath)).catch(() => undefined);

Callers 3

localFsMiddlewareFunction · 0.90
commitEntryFunction · 0.90
localGitMiddlewareFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected