code: private String validateFoldername(String resourcename) throws CmsIllegalArgumentException {
  
          if (CmsStringUtil.isEmpty(resourcename)) {
              throw new CmsIllegalArgumentException(
                  org.opencms.db.Messages.get().container(org.opencms.db.Messages.ERR_BAD_RESOURCENAME_1, resourcename));
          }
          if (!CmsResource.isFolder(resourcename)) {
              resourcename = resourcename.concat("/");
          }
          if (resourcename.charAt(0) != '/') {
              resourcename = "/".concat(resourcename);
          }
          return resourcename;
      }
docs: Checks if there are at least one character in the folder name,
  also ensures that it starts and ends with a '/'.<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>