private static String mapPath(String path) {
    if (!isCaseSensitiveFs()) {
      path = path.toLowerCase(Locale.getDefault());
    }
    if (path.endsWith("/")) {
      path = path.substring(0, path.length() - 1);
    }
    return path;
  }
private static String mapPath(String path)