(content: any)
| 361 | } |
| 362 | |
| 363 | public append(content: any): Promise<void> { |
| 364 | return new Promise<void>((resolve, reject) => { |
| 365 | try { |
| 366 | this._checkAccess(); |
| 367 | } catch (ex) { |
| 368 | reject(ex); |
| 369 | |
| 370 | return; |
| 371 | } |
| 372 | |
| 373 | this._locked = true; |
| 374 | |
| 375 | getFileAccess() |
| 376 | .appendAsync(this.path, content) |
| 377 | .then( |
| 378 | () => { |
| 379 | resolve(); |
| 380 | this._locked = false; |
| 381 | }, |
| 382 | (error) => { |
| 383 | reject(error); |
| 384 | this._locked = false; |
| 385 | }, |
| 386 | ); |
| 387 | }); |
| 388 | } |
| 389 | |
| 390 | public appendSync(content: any, onError?: (error: any) => any): void { |
| 391 | this._checkAccess(); |
nothing calls this directly
no test coverage detected