docs: protected void internalValidateResourceLength(CmsResource resource) throws CmsDataAccessException {
  
          if (resource.isFolder() && (resource.getLength() == -1)) {
              return;
          }
  
          if (resource.isFile() && (resource.getLength() >= 0)) {
              return;
          }
  
          throw new CmsDataAccessException(
              Messages.get().container(
                  Messages.ERR_INVALID_RESOURCE_LENGTH_2,
                  new Integer(resource.getLength()),
                  resource.getRootPath()));
      }