(content: any, onError?: (error: any) => any)
| 388 | } |
| 389 | |
| 390 | public appendSync(content: any, onError?: (error: any) => any): void { |
| 391 | this._checkAccess(); |
| 392 | |
| 393 | try { |
| 394 | this._locked = true; |
| 395 | |
| 396 | const that = this; |
| 397 | const localError = function (error) { |
| 398 | that._locked = false; |
| 399 | if (onError) { |
| 400 | onError(error); |
| 401 | } |
| 402 | }; |
| 403 | |
| 404 | getFileAccess().appendSync(this.path, content, localError); |
| 405 | } finally { |
| 406 | this._locked = false; |
| 407 | } |
| 408 | } |
| 409 | |
| 410 | public appendText(content: string, encoding?: string): Promise<any> { |
| 411 | return new Promise((resolve, reject) => { |
nothing calls this directly
no test coverage detected