Jarves\Storage\FileStorage::move PHP Метод

move() публичный Метод

{@inheritDoc}
public move ( $pk, $targetPk, $position = 'first', $targetObjectKey = null, $overwrite = false )
    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);
    }