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

Method listDir

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

Source from the content-addressed store, hash-verified

90 }
91
92 async listDir() {
93 await this.#connectIfNotConnected();
94 return new Promise((resolve, reject) => {
95 ftp.listDirectory(
96 this.#conId,
97 this.#path,
98 (list) => {
99 resolve(
100 list.map((i) => {
101 i.url = Url.join(this.#origin, i.url);
102 if (i.isFile) {
103 i.type = mimeType.lookup(i.name);
104 }
105 return i;
106 }),
107 );
108 },
109 reject,
110 );
111 });
112 }
113
114 /**
115 * Read file from ftp server

Callers

nothing calls this directly

Calls 3

resolveFunction · 0.85
listDirectoryMethod · 0.65

Tested by

no test coverage detected