()
| 190 | } |
| 191 | |
| 192 | async delete() { |
| 193 | await this.#connectIfNotConnected(); |
| 194 | if (!this.#stat) { |
| 195 | await this.#getStat(); |
| 196 | } |
| 197 | return new Promise((resolve, reject) => { |
| 198 | let deleteOperation; |
| 199 | |
| 200 | if (this.#stat.isDirectory) { |
| 201 | deleteOperation = ftp.deleteDirectory; |
| 202 | } else { |
| 203 | deleteOperation = ftp.deleteFile; |
| 204 | } |
| 205 | |
| 206 | deleteOperation( |
| 207 | this.#conId, |
| 208 | this.#path, |
| 209 | () => { |
| 210 | resolve(Url.join(this.#origin, this.#path)); |
| 211 | }, |
| 212 | reject, |
| 213 | ); |
| 214 | }); |
| 215 | } |
| 216 | |
| 217 | async rename(newName) { |
| 218 | await this.#connectIfNotConnected(); |
nothing calls this directly
no test coverage detected