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

Method writeFilePromise

.pnp.cjs:6714–6723  ·  view source on GitHub ↗
(p, content, opts)

Source from the content-addressed store, hash-verified

6712 }
6713 }
6714 async writeFilePromise(p, content, opts) {
6715 return await new Promise((resolve, reject) => {
6716 const fsNativePath = typeof p === `string` ? npath.fromPortablePath(p) : p;
6717 if (opts) {
6718 this.realFs.writeFile(fsNativePath, content, opts, this.makeCallback(resolve, reject));
6719 } else {
6720 this.realFs.writeFile(fsNativePath, content, this.makeCallback(resolve, reject));
6721 }
6722 });
6723 }
6724 writeFileSync(p, content, opts) {
6725 const fsNativePath = typeof p === `string` ? npath.fromPortablePath(p) : p;
6726 if (opts) {

Callers

nothing calls this directly

Calls 2

makeCallbackMethod · 0.95
writeFileMethod · 0.80

Tested by

no test coverage detected