(newName)
| 215 | } |
| 216 | |
| 217 | async rename(newName) { |
| 218 | await this.#connectIfNotConnected(); |
| 219 | const path = Path.dirname(this.#path); |
| 220 | const newPath = Path.join(path, newName); |
| 221 | return new Promise((resolve, reject) => { |
| 222 | ftp.rename( |
| 223 | this.#conId, |
| 224 | this.#path, |
| 225 | newPath, |
| 226 | async () => { |
| 227 | this.#path = newPath; |
| 228 | resolve(Url.join(this.#origin, newPath)); |
| 229 | }, |
| 230 | reject, |
| 231 | ); |
| 232 | }); |
| 233 | } |
| 234 | |
| 235 | async moveTo(newPath) { |
| 236 | newPath = Path.join(newPath, Path.basename(this.#path)); |
nothing calls this directly
no test coverage detected