MCPcopy
hub / github.com/pingcap/docs-cn / checkDestDir

Function checkDestDir

scripts/utils.js:89–96  ·  view source on GitHub ↗
(destPath)

Source from the content-addressed store, hash-verified

87};
88
89const checkDestDir = (destPath) => {
90 const dir = path.dirname(destPath);
91
92 if (!fs.existsSync(dir)) {
93 // console.info(`Create empty dir: ${dir}`);
94 fs.mkdirSync(dir, { recursive: true });
95 }
96};
97
98export const copySingleFileSync = (srcPath, destPath) => {
99 checkDestDir(destPath);

Callers 2

copySingleFileSyncFunction · 0.85
writeFileSyncFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected