first.addCommand(exitCommand);
currentPath = null;
break;
case 1:
List p = (List) Display.getDisplay(m).getCurrent();
int i = p.getSelectedIndex();
String path = p.getString(i);
if (!(path.endsWith(".mp3") || path.endsWith(".txt"))) {
DirectoryList fileList;
if (q != 0) {
String title = p.getTitle();
fileList = new DirectoryList(title + path);
currentPath = title + path;
} else {
fileList = new DirectoryList("file:///" + path);
currentPath = "file:///" + path;
}
Display.getDisplay(m).setCurrent(fileList);
fileList.setCommandListener(this);
fileList.addCommand(backCommand);
fileList.addCommand(editTagCommand);
break;
}
case 2:
List l = (List) Display.getDisplay(m).getCurrent();
int j = l.getSelectedIndex();
String file_or_path = l.getTitle() + l.getString(j);
Displayable f = null;
currentPath = file_or_path;
if (file_or_path.endsWith("/")) {
f = new DirectoryEditor(file_or_path);
f.addCommand(saveCommand);