docs: public synchronized CmsResource createResource(
          CmsRequestContext context,
          String resourcename,
          int type,
          byte[] content,
          List<CmsProperty> properties)
      throws CmsException {
  
          String checkExistsPath = "/".equals(resourcename) ? "/" : CmsFileUtil.removeTrailingSeparator(resourcename);
          // We use checkExistsPath instead of resourcename because when creating a folder /foo/bar/, we want to fail
          // if a file /foo/bar already exists.
  
          if (existsResource(context, checkExistsPath, CmsResourceFilter.ALL)) {
              // check if the resource already exists by name
              throw new CmsVfsResourceAlreadyExistsException(
                  org.opencms.db.generic.Messages.get().container(
                      org.opencms.db.generic.Messages.ERR_RESOURCE_WITH_NAME_ALREADY_EXISTS_1,
                      resourcename));
          }
          CmsDbContext dbc = m_dbContextFactory.getDbContext(context);
          CmsResource newResource = null;
          try {
              checkOfflineProject(dbc);
              newResource = m_driverManager.createResource(dbc, resourcename, type, content, properties);
          } catch (Exception e) {
              dbc.report(null, Messages.get().container(Messages.ERR_CREATE_RESOURCE_1, resourcename), e);
          } finally {
              dbc.clear();
          }
          return newResource;
      }