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

Method readSync

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

Source from the content-addressed store, hash-verified

529 }
530
531 public readSync(onError?: (error: any) => any): any {
532 this._checkAccess();
533
534 this._locked = true;
535
536 const that = this;
537 const localError = (error) => {
538 that._locked = false;
539 if (onError) {
540 onError(error);
541 }
542 };
543
544 const content = getFileAccess().readSync(this.path, localError);
545
546 this._locked = false;
547
548 return content;
549 }
550
551 public write(content: any): Promise<void> {
552 return new Promise<void>((resolve, reject) => {

Callers

nothing calls this directly

Calls 3

_checkAccessMethod · 0.95
getFileAccessFunction · 0.85
readSyncMethod · 0.65

Tested by

no test coverage detected