MCPcopy Create free account
hub / github.com/FongMi/CatVodSpider / sort

Method sort

app/src/main/java/com/github/catvod/utils/Path.java:116–122  ·  view source on GitHub ↗
(File[] files)

Source from the content-addressed store, hash-verified

114 }
115
116 public static void sort(File[] files) {
117 Arrays.sort(files, (o1, o2) -> {
118 if (o1.isDirectory() && o2.isFile()) return -1;
119 if (o1.isFile() && o2.isDirectory()) return 1;
120 return o1.getName().toLowerCase().compareTo(o2.getName().toLowerCase());
121 });
122 }
123
124 public static List<File> list(@Nullable File dir) {
125 if (dir == null) return new ArrayList<>();

Callers 2

listMethod · 0.95
getListMethod · 0.45

Calls 2

isFileMethod · 0.80
getNameMethod · 0.45

Tested by

no test coverage detected