docs: private int getFileType(String filename) throws Exception {
  
          String extension = "";
          if (filename.indexOf(".") > -1) {
              extension = filename.substring((filename.lastIndexOf(".")));
          }
  
          String typename = (String)m_extensions.get(extension.toLowerCase());
          if (typename == null) {
              typename = "binary";
          }
          CmsResourceManager resourceManager = OpenCms.getResourceManager();
  
          return resourceManager.getResourceType(typename).getTypeId();
      }