/** * Copy one Object to another Object to Cloud Files * * Example: * <code> * # ... authentication/connection/container code excluded * # ... see previous examples * * $my_docs = $conn->get_container("documents"); * $doc = $my_docs->get_object("README"); * * # Copy README.txt on top of this object (which you must have * already written something to). * # * $doc->copy("/documents/README.txt"); * </code> * * @param string $source Name of existing object * @return boolean <kbd>True</kbd> when data uploaded successfully * @throws SyntaxException missing required parameters * @throws BadContentTypeException if no Content-Type was/could be set * @throws MisMatchedChecksumException $verify is set and checksums unequal * @throws InvalidResponseException unexpected response */ function copy($source) { if (!$source && !is_string($source)) { throw new SyntaxException("Missing data source."); } $sObj = new self($this->container, $source); copy($sObj->getFSPath(), $this->getFSPath()); return True; }