code: 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;
      }
docs: Checks if there are at least one character in the folder name,
  also ensures that it ends with a '/' and doesn't start with '/'.<p>
  
  @param resourcename folder name to check (complete path)
  @return the validated folder name
  @throws CmsIllegalArgumentException if the folder name is empty or <code>null</code>