docs: public static String getExtension(String resourceName) {
  
          String result = null;
          if (!resourceName.endsWith("/")) {
              // folders don't have any extension
              resourceName = CmsResource.getName(resourceName);
              int index = resourceName.lastIndexOf(".") + 1;
              if ((index > 0) && (index < resourceName.length())) {
                  result = resourceName.substring(index).toLowerCase();
              }
          }
  
          return result;
      }