(content: any)
| 549 | } |
| 550 | |
| 551 | public write(content: any): Promise<void> { |
| 552 | return new Promise<void>((resolve, reject) => { |
| 553 | try { |
| 554 | this._checkAccess(); |
| 555 | } catch (ex) { |
| 556 | reject(ex); |
| 557 | |
| 558 | return; |
| 559 | } |
| 560 | |
| 561 | this._locked = true; |
| 562 | |
| 563 | getFileAccess() |
| 564 | .writeAsync(this.path, content) |
| 565 | .then( |
| 566 | () => { |
| 567 | resolve(); |
| 568 | this._locked = false; |
| 569 | }, |
| 570 | (error) => { |
| 571 | reject(error); |
| 572 | this._locked = false; |
| 573 | }, |
| 574 | ); |
| 575 | }); |
| 576 | } |
| 577 | |
| 578 | public writeSync(content: any, onError?: (error: any) => any): void { |
| 579 | this._checkAccess(); |
nothing calls this directly
no test coverage detected