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