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

Method pwd

src/fileSystem/sftp.js:374–398  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

372 }
373
374 pwd() {
375 return new Promise((resolve, reject) => {
376 sftp.isConnected((connectionID) => {
377 (async () => {
378 if (this.#notConnected(connectionID)) {
379 try {
380 await this.connect();
381 } catch (error) {
382 reject(error);
383 return;
384 }
385 }
386
387 sftp.pwd(
388 (res) => {
389 resolve(res);
390 },
391 (err) => {
392 reject(err);
393 },
394 );
395 })();
396 }, reject);
397 });
398 }
399
400 async connect() {
401 await new Promise((resolve, reject) => {

Callers 1

addSftpFunction · 0.45

Calls 4

#notConnectedMethod · 0.95
connectMethod · 0.95
resolveFunction · 0.85
isConnectedMethod · 0.65

Tested by

no test coverage detected