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

Method createFile

src/fileSystem/ftp.js:160–176  ·  view source on GitHub ↗
(name, content = "")

Source from the content-addressed store, hash-verified

158 }
159
160 async createFile(name, content = "") {
161 await this.#connectIfNotConnected();
162 const localFile = this.#cacheFile;
163 await internalFs.writeFile(localFile, content, true, false);
164
165 return new Promise((resolve, reject) => {
166 ftp.uploadFile(
167 this.#conId,
168 this.#cacheFile,
169 Path.join(this.#path, name),
170 async () => {
171 resolve(Url.join(this.#origin, this.#path, name));
172 },
173 reject,
174 );
175 });
176 }
177
178 async createDir(name) {
179 await this.#connectIfNotConnected();

Callers

nothing calls this directly

Calls 4

resolveFunction · 0.85
uploadFileMethod · 0.65
writeFileMethod · 0.45

Tested by

no test coverage detected