MCPcopy Create free account
hub / github.com/contentlayerdev/contentlayer / writeFile

Function writeFile

packages/@contentlayer/utils/src/fs-in-memory.ts:103–109  ·  view source on GitHub ↗
(filePath: string, content: string)

Source from the content-addressed store, hash-verified

101 )
102
103export const writeFile = (filePath: string, content: string): T.Effect<OT.HasTracer, WriteFileError, void> =>
104 OT.withSpan('writeFile', { attributes: { filePath } })(
105 T.tryCatch(
106 () => fs.writeFileSync(filePath, content, { encoding: 'utf8' }),
107 (error) => new WriteFileError({ filePath, error }),
108 ),
109 )
110
111export const writeFileJson = ({
112 filePath,

Callers 1

writeFileJsonFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…