MCPcopy
hub / github.com/SukkaW/Surge / writeFile

Function writeFile

Build/lib/misc.ts:25–31  ·  view source on GitHub ↗
(destination: string, input, dir = dirname(destination))

Source from the content-addressed store, hash-verified

23}
24
25export const writeFile: Write = async (destination: string, input, dir = dirname(destination)): Promise<void> => {
26 const p = mkdirp(dir);
27 if (p) {
28 await p;
29 }
30 return fsp.writeFile(destination, input, { encoding: 'utf-8' });
31};
32
33export function withBannerArray(title: string, description: string[] | readonly string[], date: Date, content: string[]) {
34 const result: string[] = [

Callers 2

build-public.tsFile · 0.90
compareAndWriteFileFunction · 0.90

Calls 1

mkdirpFunction · 0.85

Tested by

no test coverage detected