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

Function readFile

src/fileSystem/ftp.js:387–393  ·  view source on GitHub ↗
(encoding)

Source from the content-addressed store, hash-verified

385 return ftp.listDir();
386 },
387 async readFile(encoding) {
388 const { data } = await ftp.readFile();
389 if (encoding) {
390 return decode(data, encoding);
391 }
392 return data;
393 },
394 async writeFile(content, encoding) {
395 if (typeof content === "string" && encoding) {
396 content = await encode(content, encoding);

Callers 3

addPermissionFunction · 0.50
removePermissionFunction · 0.50
handleGetFileFunction · 0.50

Calls 2

decodeFunction · 0.90
readFileMethod · 0.45

Tested by

no test coverage detected