Sort the files in the collection.
A callback function to decide if a
or b
shall come
first in the resulting collection.
compare
shall return:
a
before b
,a
and b
,b
before a
.Return a new sorted collection. The order of files is determined by a user defined compare function. The sort is stable, that is, the original order of equal elements is preserved.
See also .sortBy()
which is simpler and faster.
Sort files in the collection by name.