if (userRootUrl == null) {
userRootUrl = dirUrlString;
// A little trick to get the root meta data
int idx = userRootUrl.lastIndexOf("/");
String user = userRootUrl.substring(idx).replace("/", "");
GSFileMetadata rootMD = new GSFileMetadata(".", "/users/" + user, userRootUrl, "", "", true);
setSelectedFile(rootMD);
}
List<GSFileMetadata> elements = dirListing.getContents();
//Unless this is the root directory create a "up-one-level" entry
if (!dirUrlString.equals(userRootUrl)) {
int lastSlashIdx = dirUrlString.lastIndexOf("/");
String parentURL = dirUrlString.substring(0, lastSlashIdx);
elements.add(0, new GSFileMetadata("Parent Directory", "", parentURL, "", "", true));
}
ListModel model = new ListModel(dirListing.getContents());
fileList.setModel(model);