MCPcopy Create free account
hub / github.com/NativeScript/NativeScript / eachEntity

Method eachEntity

packages/core/file-system/index.ts:815–836  ·  view source on GitHub ↗
(onEntity: (entity: FileSystemEntity) => boolean)

Source from the content-addressed store, hash-verified

813 }
814
815 public eachEntity(onEntity: (entity: FileSystemEntity) => boolean) {
816 if (!onEntity) {
817 return;
818 }
819
820 const onSuccess = function (fileInfo: { path: string; name: string; extension: string }): boolean {
821 let entity;
822 if (fileInfo.extension) {
823 entity = createFile(fileInfo);
824 } else {
825 entity = createFolder(fileInfo);
826 }
827
828 return onEntity(entity);
829 };
830
831 const onError = function (error) {
832 throw error;
833 };
834
835 getFileAccess().eachEntity(this.path, onSuccess, onError);
836 }
837}
838
839export namespace knownFolders {

Callers

nothing calls this directly

Calls 2

getFileAccessFunction · 0.85
eachEntityMethod · 0.65

Tested by

no test coverage detected