MCPcopy Create free account
hub / github.com/error311/FileRise / copy

Method copy

src/FileRise/Storage/WebDavAdapter.php:296–308  ·  view source on GitHub ↗
(string $from, string $to)

Source from the content-addressed store, hash-verified

294 }
295
296 public function copy(string $from, string $to): bool
297 {
298 $src = $this->buildUrlForPath($from);
299 $dst = $this->buildUrlForPath($to);
300 if ($src === '' || $dst === '') {
301 return false;
302 }
303 $status = $this->request('COPY', $src, null, [
304 'Destination' => $dst,
305 'Overwrite' => 'T',
306 ]);
307 return $status >= 200 && $status < 300;
308 }
309
310 public function delete(string $path): bool
311 {

Callers 2

copyFilesMethod · 0.45
deleteFilesMethod · 0.45

Calls 2

buildUrlForPathMethod · 0.95
requestMethod · 0.95

Tested by

no test coverage detected