docs: public static String getExtension(String resourceName) {
  
          // if the resource name indicates a folder
          if (resourceName.charAt(resourceName.length() - 1) == '/') {
              // folders have no extensions
              return "";
          }
          // get just the name of the resource
          String name = CmsResource.getName(resourceName);
          // get the position of the last dot
          int pos = name.lastIndexOf('.');
          // if no dot or if no chars after the dot
          if ((pos < 0) || ((pos + 1) == name.length())) {
              return "";
          }
          // return the extension
          return name.substring(pos).toLowerCase();
      }