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

Function writeFile

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

Source from the content-addressed store, hash-verified

47}
48
49export async function writeFile(repoPath: string, filePath: string, content: Buffer | string) {
50 const resolvedPath = await resolveNewRepoPath(repoPath, filePath);
51 await fs.mkdir(path.dirname(resolvedPath), { recursive: true });
52 await fs.writeFile(resolvedPath, content);
53}
54
55export async function deleteFile(repoPath: string, filePath: string) {
56 const resolvedPath = await resolveNewRepoPath(repoPath, filePath);

Callers 4

fs.spec.tsFile · 0.90
localFsMiddlewareFunction · 0.90
commitEntryFunction · 0.90
localGitMiddlewareFunction · 0.90

Calls 1

resolveNewRepoPathFunction · 0.90

Tested by

no test coverage detected