MCPcopy
hub / github.com/jvilk/BrowserFS / readFile

Method readFile

src/core/file_system.ts:230–230  ·  view source on GitHub ↗

* **Supplemental**: Asynchronously reads the entire contents of a file. * @param encoding If non-null, the file's contents should be decoded * into a string using that encoding. Otherwise, if encoding is null, fetch * the file's contents as a Buffer. * @param cb If no encoding is spe

(fname: string, encoding: string | null, flag: FileFlag, cb: BFSCallback<string | Buffer>)

Source from the content-addressed store, hash-verified

228 * @param cb If no encoding is specified, then the raw buffer is returned.
229 */
230 readFile(fname: string, encoding: string | null, flag: FileFlag, cb: BFSCallback<string | Buffer>): void;
231 /**
232 * **Supplemental**: Synchronously reads the entire contents of a file.
233 * @param encoding If non-null, the file's contents should be decoded

Callers 15

fetchIsoFunction · 0.65
fetchZipFunction · 0.65
rename-test.tsFile · 0.65
process_fileFunction · 0.65
node-fs-write.tsFile · 0.65
truncate.tsFile · 0.65

Implementers 10

LockedFSsrc/generic/locked_fs.ts
MountableFileSystemsrc/backend/MountableFileSystem.ts
WorkerFSsrc/backend/WorkerFS.ts
IsoFSsrc/backend/IsoFS.ts
UnlockedOverlayFSsrc/backend/OverlayFS.ts
FolderAdaptersrc/backend/FolderAdapter.ts
ZipFSsrc/backend/ZipFS.ts
XmlHttpRequestsrc/backend/XmlHttpRequest.ts
AsyncMirrorsrc/backend/AsyncMirror.ts
DropboxFileSystemsrc/backend/Dropbox.ts

Calls

no outgoing calls

Tested by

no test coverage detected