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

Method #isConnected

src/fileSystem/ftp.js:322–336  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

320 }
321
322 async #isConnected() {
323 if (!this.#conId) return false;
324 return new Promise((resolve, reject) => {
325 ftp.isConnected(
326 this.#conId,
327 (isConnected) => {
328 resolve(isConnected);
329 },
330 (error) => {
331 reject(error);
332 console.error("FTP isConnected: ", error);
333 },
334 );
335 });
336 }
337
338 async #connectIfNotConnected() {
339 const isConnected = await this.#isConnected();

Callers 1

Calls 3

resolveFunction · 0.85
isConnectedMethod · 0.65
errorMethod · 0.45

Tested by

no test coverage detected