Hi, I got a list of files and folders using dirent & stat in C, but they are not in the order I want. I want it will list the directories first then files. Ex:
.
..
[dir1]
[dir2]
[file1]
[file2]
Is there a way to do this with dirent? Or I dont want to manually order the output list. Thanks.