MCPcopy Create free account
hub / github.com/5zig/The-5zig-Mod / updateDir

Method updateDir

Minecraft-Utils/1.10/src/FileSelector.java:78–103  ·  view source on GitHub ↗
(File dir)

Source from the content-addressed store, hash-verified

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) {

Callers 3

FileSelectorMethod · 0.95
goUpMethod · 0.95
elementClickedMethod · 0.95

Calls 4

isEmptyMethod · 0.80
isHiddenMethod · 0.80
clearMethod · 0.65
addMethod · 0.45

Tested by

no test coverage detected