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

Method appendFilePromise

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

Source from the content-addressed store, hash-verified

6694 return this.realFs.copyFileSync(npath.fromPortablePath(sourceP), npath.fromPortablePath(destP), flags);
6695 }
6696 async appendFilePromise(p, content, opts) {
6697 return await new Promise((resolve, reject) => {
6698 const fsNativePath = typeof p === `string` ? npath.fromPortablePath(p) : p;
6699 if (opts) {
6700 this.realFs.appendFile(fsNativePath, content, opts, this.makeCallback(resolve, reject));
6701 } else {
6702 this.realFs.appendFile(fsNativePath, content, this.makeCallback(resolve, reject));
6703 }
6704 });
6705 }
6706 appendFileSync(p, content, opts) {
6707 const fsNativePath = typeof p === `string` ? npath.fromPortablePath(p) : p;
6708 if (opts) {

Callers

nothing calls this directly

Calls 2

makeCallbackMethod · 0.95
appendFileMethod · 0.80

Tested by

no test coverage detected