MCPcopy
hub / github.com/intentui/intentui / write

Function write

src/scripts/generate-registry.ts:137–140  ·  view source on GitHub ↗
(p: string, c: string)

Source from the content-addressed store, hash-verified

135
136const read = async (p: string) => fs.readFile(p, 'utf8')
137const write = async (p: string, c: string) => {
138 await fs.mkdir(path.dirname(p), { recursive: true })
139 await fs.writeFile(p, c, 'utf8')
140}
141const exists = async (p: string) => !!(await fs.stat(p).catch(() => false))
142const toPosix = (p: string) => p.split(path.sep).join('/')
143const stripExt = (p: string) => p.replace(/\.[^.]+$/, '')

Callers 1

buildBlockItemFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected