(name, content = "")
| 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(); |
nothing calls this directly
no test coverage detected