MCPcopy Create free account
hub / github.com/Silentely/eSIM-Tools / writeFile

Function writeFile

scripts/generate-agent-metadata.js:248–253  ·  view source on GitHub ↗

* 写入文件(带日志)

(filePath, content)

Source from the content-addressed store, hash-verified

246 * 写入文件(带日志)
247 */
248async function writeFile(filePath, content) {
249 const relativePath = path.relative(distDir, filePath);
250 await ensureDir(path.dirname(filePath));
251 await fs.promises.writeFile(filePath, content, 'utf-8');
252 BuildLogger.log(` ✓ ${relativePath}`);
253}
254
255/**
256 * 主函数

Callers 1

mainFunction · 0.85

Calls 2

ensureDirFunction · 0.85
logMethod · 0.45

Tested by

no test coverage detected