Commit e8efbeb2 authored by Thorsten Buss's avatar Thorsten Buss

add overwrite to RepoLinker::copy()

parent 7799d90f
......@@ -164,14 +164,15 @@ class RepositoryLinker {
* @param string $sourceKey
* @param string $targetKey
* @param boolean $overwrite Whether to overwrite the file if exists
* @return boolean TRUE if the copy was successful
* @throws FileNotFound when sourceKey does not exist
* @throws UnexpectedFile when targetKey exists
* @throws \RuntimeException when cannot copy
public function copy($sourceKey, $targetKey) {
return $this->write($targetKey, $this->read($sourceKey)) !== false;
public function copy($sourceKey, $targetKey, $overwrite = false) {
return $this->write($targetKey, $this->read($sourceKey), $overwrite) !== false;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment