docs: public CmsFile writeFile(CmsFile resource) throws CmsException {
  
          CmsFile res = null;
  
          // remove the added UTF-8 marker
          if (needUtf8Marker(resource)) {
              resource.setContents(CmsResourceWrapperUtils.removeUtf8Marker(resource.getContents()));
          }
  
          String resourcename = m_cms.getSitePath(resource);
          if (!m_cms.existsResource(resourcename)) {
  
              // iterate through all wrappers and call "writeFile" till one does not return null
              List<I_CmsResourceWrapper> wrappers = getWrappers();
              Iterator<I_CmsResourceWrapper> iter = wrappers.iterator();
              while (iter.hasNext()) {
                  I_CmsResourceWrapper wrapper = iter.next();
                  res = wrapper.writeFile(m_cms, resource);
                  if (res != null) {
                      break;
                  }
              }
  
              // delegate the call to the CmsObject
              if (res == null) {
                  res = m_cms.writeFile(resource);
              }
          } else {
              res = m_cms.writeFile(resource);
          }
  
          return res;
      }