(onError?: (error: any) => any, encoding?: string)
| 623 | } |
| 624 | |
| 625 | public readTextSync(onError?: (error: any) => any, encoding?: string): string { |
| 626 | this._checkAccess(); |
| 627 | |
| 628 | this._locked = true; |
| 629 | |
| 630 | const that = this; |
| 631 | const localError = (error) => { |
| 632 | that._locked = false; |
| 633 | if (onError) { |
| 634 | onError(error); |
| 635 | } |
| 636 | }; |
| 637 | |
| 638 | const content = getFileAccess().readTextSync(this.path, localError, encoding); |
| 639 | this._locked = false; |
| 640 | |
| 641 | return content; |
| 642 | } |
| 643 | |
| 644 | public writeText(content: string, encoding?: string): Promise<any> { |
| 645 | return new Promise((resolve, reject) => { |
nothing calls this directly
no test coverage detected