code: public CmsFile writeFile(CmsFile resource) throws CmsException {
  
          return getResourceType(resource).writeFile(this, m_securityManager, resource);
      }
docs: Writes a resource to the OpenCms VFS, including it's content.<p>
  
  Applies only to resources of type <code>{@link CmsFile}</code>
  i.e. resources that have a binary content attached.<p>
  
  Certain resource types might apply content validation or transformation rules
  before the resource is actually written to the VFS. The returned result
  might therefore be a modified version from the provided original.<p>
  
  @param resource the resource to write
  
  @return the written resource (may have been modified)
  
  @throws CmsException if something goes wrong