I have been working on this String Split method and the special for loop that I am currently trying to get to properly work does not seem to be working no matter what I do. It keeps printing just the parent directory and not the lower directories.
public boolean moveDown(String file) {
String[] input = file.split("\\\\"); // breaks string into individual file names
ArrayList<Node> children = current.getChildren();
for (Node c : children) {
if (file.equals(c.getName())) {
current = c;
location += "\\" + current.getName();
return true;
if(file.equals(c.getName(file.split()))){
current = c;
location+= "\\" + current.getName();
return true;
}
}
}
return false;
}