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

Method goUp

Minecraft-Utils/1.13/src/FileSelector.java:55–75  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

53 }
54
55 @Override
56 public void goUp() {
57 if (currentDir == null)
58 return;
59 File parent = currentDir.getParentFile();
60 if (parent == null) {
61 currentDir = null;
62 files.clear();
63 File[] a = File.listRoots();
64 if (a == null)
65 return;
66 for (File file : a) {
67 if (!fsv.isDrive(file) || fsv.getSystemDisplayName(file).isEmpty())
68 continue;
69 files.add(file);
70 }
71 selectedFile = files.isEmpty() ? -1 : 0;
72 return;
73 }
74 updateDir(parent);
75 }
76
77 @Override
78 public void updateDir(File dir) {

Callers

nothing calls this directly

Calls 4

updateDirMethod · 0.95
isEmptyMethod · 0.80
clearMethod · 0.65
addMethod · 0.45

Tested by

no test coverage detected