/** * Implement the workspace copy method. It is dispatched immediately. * * @param string $srcAbsPath the path of the node to be copied. * @param string $destAbsPath the location to which the node at srcAbsPath * is to be copied in this workspace. * @param string $srcWorkspace the name of the workspace from which the * copy is to be made. * * @see Workspace::copy() */ public function copyNodeImmediately($srcAbsPath, $destAbsPath, $srcWorkspace) { if (!$this->transport instanceof WritingInterface) { throw new UnsupportedRepositoryOperationException('Transport does not support writing'); } $srcAbsPath = PathHelper::normalizePath($srcAbsPath); $destAbsPath = PathHelper::normalizePath($destAbsPath, true); if ($this->session->nodeExists($destAbsPath)) { throw new ItemExistsException('Node already exists at destination (update-on-copy is currently not supported)'); // to support this, we would have to update the local cache of nodes as well } $this->transport->copyNode($srcAbsPath, $destAbsPath, $srcWorkspace); }