MCPcopy Index your code
hub / github.com/Acode-Foundation/Acode / readFile

Method readFile

src/fileSystem/ftp.js:118–135  ·  view source on GitHub ↗

* Read file from ftp server * @returns

()

Source from the content-addressed store, hash-verified

116 * @returns
117 */
118 async readFile() {
119 await this.#connectIfNotConnected();
120 return new Promise((resolve, reject) => {
121 ftp.downloadFile(
122 this.#conId,
123 this.#path,
124 this.#cacheFile,
125 async () => {
126 const data = await internalFs.readFile(this.#cacheFile);
127 resolve(data);
128 },
129 (error) => {
130 reject(error);
131 console.error("FTP readFile: ", error);
132 },
133 );
134 });
135 }
136
137 /**
138 * Write file to ftp server

Callers 15

handleRequestFunction · 0.45
checkFileFunction · 0.45
addSftpFunction · 0.45
checkPluginsUpdateFunction · 0.45
runFunction · 0.45
sendFileFunction · 0.45
sendFileContentFunction · 0.45
LoggerClass · 0.45
jsCompareFunction · 0.45
editorFile.jsFile · 0.45
openFile.jsFile · 0.45
loadConfigFileFunction · 0.45

Calls 4

resolveFunction · 0.85
downloadFileMethod · 0.65
errorMethod · 0.45

Tested by

no test coverage detected