(dest: string)
| 455 | } |
| 456 | |
| 457 | public copy(dest: string): Promise<boolean> { |
| 458 | return new Promise<boolean>((resolve, reject) => { |
| 459 | try { |
| 460 | this._checkAccess(); |
| 461 | } catch (ex) { |
| 462 | reject(ex); |
| 463 | |
| 464 | return; |
| 465 | } |
| 466 | |
| 467 | this._locked = true; |
| 468 | |
| 469 | getFileAccess() |
| 470 | .copyAsync(this.path, dest) |
| 471 | .then( |
| 472 | (result) => { |
| 473 | resolve(result); |
| 474 | this._locked = false; |
| 475 | }, |
| 476 | (error) => { |
| 477 | reject(error); |
| 478 | this._locked = false; |
| 479 | }, |
| 480 | ); |
| 481 | }); |
| 482 | } |
| 483 | |
| 484 | public copySync(dest: string, onError?: (error: any) => any): any { |
| 485 | this._checkAccess(); |
nothing calls this directly
no test coverage detected