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

Method append

packages/core/file-system/index.ts:363–388  ·  view source on GitHub ↗
(content: any)

Source from the content-addressed store, hash-verified

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();

Callers

nothing calls this directly

Calls 4

_checkAccessMethod · 0.95
getFileAccessFunction · 0.85
appendAsyncMethod · 0.65
resolveFunction · 0.50

Tested by

no test coverage detected