def download_contents(self, to_folder=None):
to_folder = to_folder or Path()<EOL>if not to_folder.exists():<EOL><INDENT>to_folder.mkdir()<EOL><DEDENT>for item in self.get_items(query=self.new_query().select('<STR_LIT:id>', '<STR_LIT:size>')):<EOL><INDENT>if item.is_folder and item.child_count > <NUM_LIT:0>:<EOL><INDENT>item.download_contents(to_folder=to_folder / item.name)<EOL><DEDENT>else:<EOL><INDENT>item.download(to_folder)<EOL><DEDENT><DEDENT>
This will download each file and folder sequentially.
        Caution when downloading big folder structures

        :param drive.Folder to_folder: folder where to store the contents