According to this issue, I am implementing gradual fetching by scrolling in FM app. I have two issues.
- I need to detect when the whole data is fetched to stop fetching the next time scroll hits the bottom.
So I think I need to initially get total number of directories and files of a path (without calling readdir api and getting the list) and save it into some state.
I checked the stat api, but it does not provide this attribute.
- I need to have the last file returned from server, but the list returned here is not in the same order as server response, due to some sorting done here.