* displaying path information as breadcrumb.
*/
public List<KeyValueObject> getCurrentDirectoryHierarchy() {
List<KeyValueObject> directoryHierarchy = new ArrayList<KeyValueObject>();
directoryHierarchy.add(new KeyValueObject("/", "root"));
String fullPath = this.currentDirectory.getPath();
if (fullPath.length() > 1) {
String[] directoryNames = fullPath.substring(1).split("/");
String directoryPath = "";
for (String directoryName : directoryNames) {
directoryPath = directoryPath + "/" + directoryName;
directoryHierarchy.add(new KeyValueObject(directoryPath, directoryName));
}
}
return directoryHierarchy;
}