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

Function writeFile

packages/@contentlayer/utils/src/node/fs.ts:105–111  ·  view source on GitHub ↗
(filePath: string, content: string)

Source from the content-addressed store, hash-verified

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

Callers 2

writeFileJsonFunction · 0.70
writeFilesForCacheFunction · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…