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

Method readFilePromise

.pnp.cjs:6792–6797  ·  view source on GitHub ↗
(p, encoding)

Source from the content-addressed store, hash-verified

6790 return this.realFs.symlinkSync(npath.fromPortablePath(target.replace(/\/+$/, ``)), npath.fromPortablePath(p), type);
6791 }
6792 async readFilePromise(p, encoding) {
6793 return await new Promise((resolve, reject) => {
6794 const fsNativePath = typeof p === `string` ? npath.fromPortablePath(p) : p;
6795 this.realFs.readFile(fsNativePath, encoding, this.makeCallback(resolve, reject));
6796 });
6797 }
6798 readFileSync(p, encoding) {
6799 const fsNativePath = typeof p === `string` ? npath.fromPortablePath(p) : p;
6800 return this.realFs.readFileSync(fsNativePath, encoding);

Callers

nothing calls this directly

Calls 2

makeCallbackMethod · 0.95
readFileMethod · 0.80

Tested by

no test coverage detected