MCPcopy Create free account
hub / github.com/bridge-codes/bridge / writeFileAsync

Function writeFileAsync

packages/bridge-compile/bin/utils/fsAsync.ts:3–10  ·  view source on GitHub ↗
(filePath: string, content: string)

Source from the content-addressed store, hash-verified

1import fs from 'fs';
2
3export const writeFileAsync = (filePath: string, content: string) => {
4 return new Promise(function (resolve, reject) {
5 fs.writeFile(filePath, content, function (err) {
6 if (err) reject(err);
7 else resolve({ success: true });
8 });
9 });
10};
11
12export const mkdirAsync = (folderPath: string) => {
13 return new Promise(function (resolve, reject) {

Callers 2

index.tsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected