docs: String ensureFoldername(String resourcename) {
  
          if (CmsStringUtil.isEmpty(resourcename)) {
              return "";
          }
          if (!CmsResource.isFolder(resourcename)) {
              resourcename = resourcename.concat("/");
          }
          if (resourcename.charAt(0) == '/') {
              resourcename = resourcename.substring(1);
          }
          return resourcename;
      }