protected function move_file_from_root_to_folder(\repository_googledocs\rest $client, $fileid, $folderid) {
        // Set the parent.
        $params = [
            'fileid' => $fileid, 'addParents' => $folderid, 'removeParents' => 'root'
        ];
        $response = $client->call('update', $params, ' ');
        if (empty($response->id)) {
            $details = 'Cannot move the file to a folder: ' . $fileid;
            throw new repository_exception('errorwhilecommunicatingwith', 'repository', '', $details);
        }
        return true;
    }