code: public static String path(String file) {
        if (StringUtils.isNullOrBlank(file)) {
           return StringUtils.EMPTY;
        }
        file = StringUtils.trim(file);
        int pos = indexOfLastSeparator(file);
        return pos == file.length() - 1 ? file.substring(0, file.length() - 1) : file;
     }
docs: Returns the path of the file in the same manner as {@link java.io.File#getPath()}.
  
  @param file The file
  @return The path or null if the file is null or empty