Right now I have a piece of code that gets a list of file names in a directory like shown in the code below:
However, doing it this way causes the GUI thread to block until all the files have been listed in a certain directory. My question is - how do I get a list of files in a directory so that the list is updated one element at a time, and the GUI can display the elements one at a time instead of waiting for the whole list to be completed?
However, doing it this way causes the GUI thread to block until all the files have been listed in a certain directory. My question is - how do I get a list of files in a directory so that the list is updated one element at a time, and the GUI can display the elements one at a time instead of waiting for the whole list to be completed?