code: public static String removeRelativeParts(final String path) {
  
  		String partialPath = "";
  
  		for (String part : PathHelper.getParts(path)) {
  
  			// ignore ".." and "." in paths
  			if ("..".equals(part) || ".".equals(part)) {
  				continue;
  			}
  
  			partialPath += PathHelper.PATH_SEP + part;
  		}
  
  		return partialPath;
  	}
docs: Simply removes all relative parts of a path (meaning ".." and ".")
  
  @param path
  @return path without relative parts