Update path/filepath to use new slice.sort; Add sort.reverse_interface

This commit is contained in:
gingerBill
2020-10-14 20:47:13 +01:00
parent edd802e1ff
commit 7fc3030c63
3 changed files with 24 additions and 16 deletions
+3 -3
View File
@@ -1,7 +1,7 @@
package filepath
import "core:os"
import "core:sort"
import "core:slice"
import "core:strings"
import "core:unicode/utf8"
@@ -284,8 +284,8 @@ _glob :: proc(dir, pattern: string, matches: ^[dynamic]string) -> (m: [dynamic]s
fis, _ := os.read_dir(d, -1);
sort.quick_sort_proc(fis, proc(a, b: os.File_Info) -> int {
return sort.compare_strings(a.name, b.name);
slice.sort_proc(fis, proc(a, b: os.File_Info) -> bool {
return a.name < b.name;
});
defer {
for fi in fis {