protected function create_folder_in_folder(\repository_onedrive\rest $client, $foldername, $parentid) {
        $params = ['parentid' => $parentid];
        $folder = [ 'name' => $foldername, 'folder' => [ 'childCount' => 0 ]];
        $created = $client->call('create_folder', $params, json_encode($folder));
        if (empty($created->id)) {
            $details = 'Cannot create folder:' . $foldername;
            throw new repository_exception('errorwhilecommunicatingwith', 'repository', '', $details);
        }
        return $created->id;
    }
protected function create_folder_in_folder(\repository_onedrive\rest $client, $foldername, $parentid) {
        $params = ['parentid' => $parentid];
        $folder = [ 'name' => $foldername, 'folder' => [ 'childCount' => 0 ]];
        $created = $client->call('create_folder', $params, json_encode($folder));
        if (empty($created->id)) {
            $details = 'Cannot create folder:' . $foldername;
            throw new repository_exception('errorwhilecommunicatingwith', 'repository', '', $details);
        }
        return $created->id;
    }
protected function create_folder_in_folder ( \ repository_onedrive \ rest $ client , $ foldername , $ parentid ) { $ params = [ 'parentid' => $ parentid ] ; $ folder = [ 'name' => $ foldername , 'folder' => [ 'childCount' => 0 ] ] ; $ created = $ client -> call ( 'create_folder' , $ params , json_encode ( $ folder ) ) ; if ( empty ( $ created -> id ) ) { $ details = 'Cannot create folder:' . $ foldername ; throw new repository_exception ( 'errorwhilecommunicatingwith' , 'repository' , '' , $ details ) ; } return $ created -> id ; }
Create a folder within a folder

@param \repository_onedrive\rest $client Authenticated client.
@param string $foldername The folder we are creating.
@param string $parentid The parent folder we are creating in.

@return string The file id of the new folder.
Create a folder within a folder