(newPath)
| 233 | } |
| 234 | |
| 235 | async moveTo(newPath) { |
| 236 | newPath = Path.join(newPath, Path.basename(this.#path)); |
| 237 | await this.#connectIfNotConnected(); |
| 238 | return new Promise((resolve, reject) => { |
| 239 | ftp.rename( |
| 240 | this.#conId, |
| 241 | this.#path, |
| 242 | newPath, |
| 243 | async () => { |
| 244 | this.#path = newPath; |
| 245 | resolve(Url.join(this.#origin, newPath)); |
| 246 | }, |
| 247 | reject, |
| 248 | ); |
| 249 | }); |
| 250 | } |
| 251 | |
| 252 | async exists() { |
| 253 | await this.#connectIfNotConnected(); |
no test coverage detected