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

Method getEntitiesSync

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

Source from the content-addressed store, hash-verified

795 }
796
797 public getEntitiesSync(onError?: (error: any) => any): Array<FileSystemEntity> {
798 const fileInfos = getFileAccess().getEntities(this.path, onError);
799 if (!fileInfos) {
800 return null;
801 }
802
803 const entities = new Array<FileSystemEntity>();
804 for (let i = 0; i < fileInfos.length; i++) {
805 if (fileInfos[i].extension) {
806 entities.push(createFile(fileInfos[i]));
807 } else {
808 entities.push(createFolder(fileInfos[i]));
809 }
810 }
811
812 return entities;
813 }
814
815 public eachEntity(onEntity: (entity: FileSystemEntity) => boolean) {
816 if (!onEntity) {

Callers 1

getEntitiesMethod · 0.95

Calls 5

getFileAccessFunction · 0.85
createFileFunction · 0.85
createFolderFunction · 0.85
getEntitiesMethod · 0.65
pushMethod · 0.45

Tested by

no test coverage detected