MCPcopy Index your code
hub / github.com/NativeScript/NativeScript / appendSync

Method appendSync

packages/core/file-system/index.ts:390–408  ·  view source on GitHub ↗
(content: any, onError?: (error: any) => any)

Source from the content-addressed store, hash-verified

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) => {

Callers

nothing calls this directly

Calls 3

_checkAccessMethod · 0.95
getFileAccessFunction · 0.85
appendSyncMethod · 0.65

Tested by

no test coverage detected