MCPcopy Create free account
hub / github.com/codesandbox/excalidraw-firebase / writeFilePromise

Method writeFilePromise

.pnp.loader.mjs:1140–1149  ·  view source on GitHub ↗
(p, content, opts)

Source from the content-addressed store, hash-verified

1138 }
1139 }
1140 async writeFilePromise(p, content, opts) {
1141 return await new Promise((resolve, reject) => {
1142 const fsNativePath = typeof p === `string` ? npath.fromPortablePath(p) : p;
1143 if (opts) {
1144 this.realFs.writeFile(fsNativePath, content, opts, this.makeCallback(resolve, reject));
1145 } else {
1146 this.realFs.writeFile(fsNativePath, content, this.makeCallback(resolve, reject));
1147 }
1148 });
1149 }
1150 writeFileSync(p, content, opts) {
1151 const fsNativePath = typeof p === `string` ? npath.fromPortablePath(p) : p;
1152 if (opts) {

Callers 6

copyFileViaIndexFunction · 0.45
copyFileDirectFunction · 0.45
changeFileTextPromiseMethod · 0.45
writeJsonPromiseMethod · 0.45
writeFilePromiseMethod · 0.45

Calls 2

makeCallbackMethod · 0.95
writeFileMethod · 0.80

Tested by

no test coverage detected