(onError?: (error: any) => any)
| 529 | } |
| 530 | |
| 531 | public readSync(onError?: (error: any) => any): any { |
| 532 | this._checkAccess(); |
| 533 | |
| 534 | this._locked = true; |
| 535 | |
| 536 | const that = this; |
| 537 | const localError = (error) => { |
| 538 | that._locked = false; |
| 539 | if (onError) { |
| 540 | onError(error); |
| 541 | } |
| 542 | }; |
| 543 | |
| 544 | const content = getFileAccess().readSync(this.path, localError); |
| 545 | |
| 546 | this._locked = false; |
| 547 | |
| 548 | return content; |
| 549 | } |
| 550 | |
| 551 | public write(content: any): Promise<void> { |
| 552 | return new Promise<void>((resolve, reject) => { |
nothing calls this directly
no test coverage detected