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

Method copy

packages/core/file-system/index.ts:457–482  ·  view source on GitHub ↗
(dest: string)

Source from the content-addressed store, hash-verified

455 }
456
457 public copy(dest: string): Promise<boolean> {
458 return new Promise<boolean>((resolve, reject) => {
459 try {
460 this._checkAccess();
461 } catch (ex) {
462 reject(ex);
463
464 return;
465 }
466
467 this._locked = true;
468
469 getFileAccess()
470 .copyAsync(this.path, dest)
471 .then(
472 (result) => {
473 resolve(result);
474 this._locked = false;
475 },
476 (error) => {
477 reject(error);
478 this._locked = false;
479 },
480 );
481 });
482 }
483
484 public copySync(dest: string, onError?: (error: any) => any): any {
485 this._checkAccess();

Callers

nothing calls this directly

Calls 4

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

Tested by

no test coverage detected