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

Method appendTextSync

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

Source from the content-addressed store, hash-verified

435 }
436
437 public appendTextSync(content: string, onError?: (error: any) => any, encoding?: string): void {
438 this._checkAccess();
439
440 try {
441 this._locked = true;
442
443 const that = this;
444 const localError = function (error) {
445 that._locked = false;
446 if (onError) {
447 onError(error);
448 }
449 };
450
451 getFileAccess().appendTextSync(this.path, content, localError, encoding);
452 } finally {
453 this._locked = false;
454 }
455 }
456
457 public copy(dest: string): Promise<boolean> {
458 return new Promise<boolean>((resolve, reject) => {

Callers

nothing calls this directly

Calls 3

_checkAccessMethod · 0.95
getFileAccessFunction · 0.85
appendTextSyncMethod · 0.65

Tested by

no test coverage detected