MCPcopy Index your code
hub / github.com/ds300/patch-package / writeFiles

Function writeFiles

property-based-tests/executeTestCase.ts:49–60  ·  view source on GitHub ↗
(cwd: string, files: Files)

Source from the content-addressed store, hash-verified

47})
48
49function writeFiles(cwd: string, files: Files): void {
50 const mkdirpSync = require("fs-extra/lib/mkdirs/index.js").mkdirpSync
51 const writeFileSync = require("fs").writeFileSync
52 Object.keys(files).forEach((filePath) => {
53 if (!filePath.startsWith(".git/")) {
54 mkdirpSync(join(cwd, dirname(filePath)))
55 writeFileSync(join(cwd, filePath), files[filePath].contents, {
56 mode: files[filePath].mode,
57 })
58 }
59 })
60}
61
62function removeLeadingSpaceOnBlankLines(patchFileContents: string): string {
63 return patchFileContents

Callers 1

executeTestCaseFunction · 0.85

Calls 1

joinFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…