MCPcopy Create free account
hub / github.com/Acode-Foundation/Acode / readFile

Function readFile

src/fileSystem/sftp.js:616–624  ·  view source on GitHub ↗
(encoding)

Source from the content-addressed store, hash-verified

614 return sftp.lsDir();
615 },
616 async readFile(encoding) {
617 const { data } = await sftp.readFile();
618
619 if (encoding) {
620 return decode(data, encoding);
621 }
622
623 return data;
624 },
625 async writeFile(content, encoding) {
626 if (typeof content === "string" && encoding) {
627 content = await encode(content, encoding);

Callers

nothing calls this directly

Calls 2

decodeFunction · 0.90
readFileMethod · 0.45

Tested by

no test coverage detected