Reputation: 565
I'm implementing mylsl.c (which is equivalent to "ls -l") method for Unix. Everything is set pretty much, except the contents of the current directory is being shown in a random order.
So the question is how could I sort the contents by filename?
Upvotes: 1
Views: 417
Reputation: 993323
The general solution to this problem is:
The OS does not provide a way to list them in sorted order for you.
Upvotes: 2