Closed jbweston closed 6 years ago
This is expected: glob
returns the files in the same order as getDirectoryContents
produces them. Try ls -U
("do not sort; list entries in directory order") and you should see the same order. If you want to sort the results, you may do so yourself afterwards — that's what ls
also does internally.
Thanks for the clarification.
Not sure if this is a bug or expected behavior, but glob matches are returned in a (seemingly) arbitrary order.
I would expect the results to be in lexicographic order, so as to match the output of
ls
on the same glob.Steps to reproduce
Create some files
Install
Glob
version0.9.2
Match some globs