g_file_enumerator_next_files_async() API is bad
Submitted by Benjamin Otte (Company)
Link to original bug (#587090)
Description
The function call g_file_enumerator_next_files_async() has a "num_files" argument. This argument is kind of bogus, as I cannot imagine a good use case for enumerating a specific number of files from a directory.
What I can imagine, and what is also my use case, is enumerating all files in a directory and when this takes too much time, get progress updates (the g_file_copy() function has something like this). I have no idea what number I am supposed to pass to this function (and apparently, the same goes for everybody else, as everyone just passes 100 for no reason whatsoever).
I could have imagined a "milliseconds" argument instead of the "num_files" argument to be the maximum time after which an incomplete list should be returned.