(content: any, onError?: (error: any) => any)
| 576 | } |
| 577 | |
| 578 | public writeSync(content: any, onError?: (error: any) => any): void { |
| 579 | this._checkAccess(); |
| 580 | |
| 581 | try { |
| 582 | this._locked = true; |
| 583 | |
| 584 | const that = this; |
| 585 | const localError = function (error) { |
| 586 | that._locked = false; |
| 587 | if (onError) { |
| 588 | onError(error); |
| 589 | } |
| 590 | }; |
| 591 | |
| 592 | getFileAccess().writeSync(this.path, content, localError); |
| 593 | } finally { |
| 594 | this._locked = false; |
| 595 | } |
| 596 | } |
| 597 | |
| 598 | public readText(encoding?: string): Promise<string> { |
| 599 | return new Promise((resolve, reject) => { |
nothing calls this directly
no test coverage detected