in taverna-server-webapp/src/main/java/org/apache/taverna/server/master/utils/FilenameUtils.java [139:159]
public DirectoryEntry getDirEntry(TavernaRun run, DirEntryReference d)
throws FilesystemAccessException, NoDirectoryEntryException {
Directory dir = run.getWorkingDirectory();
if (d == null || d.path == null || d.path.isEmpty())
return dir;
DirectoryEntry found = dir;
boolean mustBeLast = false;
for (String bit : d.path.split("/")) {
if (mustBeLast)
throw new FilesystemAccessException(TYPE_ERROR);
found = getEntryFromDir(bit, dir);
dir = null;
if (found instanceof Directory) {
dir = (Directory) found;
mustBeLast = false;
} else
mustBeLast = true;
}
return found;
}