| @@ 110-112 (lines=3) @@ | ||
| 107 | */ |
|
| 108 | public function rename(string $newname, bool $overwrite = true):Directory{ |
|
| 109 | ||
| 110 | if(!$this->filereader->rename($this->path, $newname, $overwrite)){ |
|
| 111 | throw new FilereaderException('cannot rename '.$this->path.' to '.$newname); // @codeCoverageIgnore |
|
| 112 | } |
|
| 113 | ||
| 114 | return $this->change($newname); |
|
| 115 | } |
|
| @@ 88-90 (lines=3) @@ | ||
| 85 | */ |
|
| 86 | public function rename(string $newname, bool $overwrite = true):File{ |
|
| 87 | ||
| 88 | if(!$this->filereader->rename($this->path, $newname, $overwrite)){ |
|
| 89 | throw new FilereaderException('cannot rename '.$this->path.' to '.$newname); // @codeCoverageIgnore |
|
| 90 | } |
|
| 91 | ||
| 92 | if(!$this->filereader->isFile($newname)){ |
|
| 93 | throw new FilereaderException('file not found: '.$newname); // @codeCoverageIgnore |
|