(File dir)
| 76 | } |
| 77 | |
| 78 | @Override |
| 79 | public void updateDir(File dir) { |
| 80 | currentDir = dir; |
| 81 | files.clear(); |
| 82 | if (dir == null) { |
| 83 | File[] a = File.listRoots(); |
| 84 | if (a == null) |
| 85 | return; |
| 86 | for (File file : a) { |
| 87 | if (!fsv.isDrive(file) || fsv.getSystemDisplayName(file).isEmpty()) |
| 88 | continue; |
| 89 | files.add(file); |
| 90 | } |
| 91 | selectedFile = files.isEmpty() ? -1 : 0; |
| 92 | return; |
| 93 | } |
| 94 | File[] a = dir.listFiles(); |
| 95 | if (a == null) |
| 96 | return; |
| 97 | for (File file : a) { |
| 98 | if (file.isHidden()) |
| 99 | continue; |
| 100 | files.add(file); |
| 101 | } |
| 102 | selectedFile = files.isEmpty() ? -1 : 0; |
| 103 | } |
| 104 | |
| 105 | @Override |
| 106 | public void draw(int mouseX, int mouseY, float partialTicks) { |
no test coverage detected