MCPcopy Index your code
hub / github.com/lingodotdev/lingo.dev / writeFile

Function writeFile

packages/cli/src/cli/utils/fs.ts:16–23  ·  view source on GitHub ↗
(filePath: string, content: string)

Source from the content-addressed store, hash-verified

14}
15
16export function writeFile(filePath: string, content: string) {
17 // create dirs
18 const dir = path.dirname(filePath);
19 if (!fs.existsSync(dir)) {
20 fs.mkdirSync(dir, { recursive: true });
21 }
22 fs.writeFileSync(filePath, content);
23}
24
25export function checkIfFileExists(filePath: string) {
26 return fs.existsSync(filePath);

Callers 3

loadLockFunction · 0.90
saveLockFunction · 0.90
mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected