/**
* {@inheritDoc}
*/
public function move($pk, $targetPk, $position = 'first', $targetObjectKey = null, $overwrite = false)
{
if ($pk) {
$path = $this->getPathFromPK($pk);
} else {
$path = '/';
}
$target = is_numeric($targetPk['id']) ? $this->webFilesystem->getPath($targetPk['id']) : $targetPk['id'];
$target = $target . '/' . basename($path);
if (!$overwrite && $this->webFilesystem->has($target)) {
return ['targetExists' => true];
}
$this->checkAccess($path);
$this->checkAccess($target);
return $this->webFilesystem->move($path, $target);
}