MCPcopy Index your code
hub / github.com/pingcap/docs-cn / copyFileWithCustomContentSync

Function copyFileWithCustomContentSync

scripts/utils.js:104–108  ·  view source on GitHub ↗
(srcPath, destPath, handler)

Source from the content-addressed store, hash-verified

102};
103
104export const copyFileWithCustomContentSync = (srcPath, destPath, handler) => {
105 const srcContent = fs.readFileSync(srcPath).toString();
106 const fileContent = handler(srcContent);
107 writeFileSync(destPath, fileContent);
108};
109
110export const writeFileSync = (destPath, fileContent) => {
111 checkDestDir(destPath);

Callers 1

Calls 1

writeFileSyncFunction · 0.85

Tested by

no test coverage detected