We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi, I was wondering if there's a possibility to have tinydir_open_sorted to have multiple sorting options. One way I can think of to achieve this would be to pass our own (comparator?) like this one https://github.com/cxong/tinydir/blob/master/tinydir.h#L755
This would allow the user to sort alphabetically in both ascending/descending order as well sorting by size, timestamps etc.
The text was updated successfully, but these errors were encountered:
I prefer keeping compatibility, which means we could add a new function like tinydir_open_custom which can take in a comparator.
tinydir_open_custom
To maintain forward compatibility, we could define an options struct, which just has the comparator for now, but could have more fields in the future.
As a workaround for now, you could perform your own qsort on dir._files.
qsort
dir._files
Sorry, something went wrong.
Thanks for your response, I may as well go with your workaround for now.
No branches or pull requests
Hi, I was wondering if there's a possibility to have tinydir_open_sorted to have multiple sorting options. One way I can think of to achieve this would be to pass our own (comparator?) like this one https://github.com/cxong/tinydir/blob/master/tinydir.h#L755
This would allow the user to sort alphabetically in both ascending/descending order as well sorting by size, timestamps etc.
The text was updated successfully, but these errors were encountered: