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;
    }
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;
    }
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 ; }
Move from root to folder

@param \repository_googledocs\rest $client Authenticated client.
@param string $fileid The file we are updating.
@param string $folderid The id of the folder we are moving to
@return boolean
Move from root to folder