code: public static String getFolderPath(final String path) {
  
  		String cleanedPath = clean(path);
  
  		if (cleanedPath != null && cleanedPath.contains(PATH_SEP)) {
  
  			return PATH_SEP + StringUtils.substringBeforeLast(cleanedPath, PATH_SEP);
  
  		} else {
  
  			return PATH_SEP;
  
  		}
  	}
docs: Return part of the given path before the last separator or the root path ("/") if no separator was found
  
  @param path
  @return name