async def download(self, source, destination="<STR_LIT>", *, write_into=False,<EOL>block_size=DEFAULT_BLOCK_SIZE):
source = pathlib.PurePosixPath(source)<EOL>destination = pathlib.Path(destination)<EOL>if not write_into:<EOL><INDENT>destination = destination / source.name<EOL><DEDENT>if await self.is_file(source):<EOL><INDENT>await self.path_io.mkdir(destination.parent,<EOL>parents=True, exist_ok=True)<EOL>async with self.path_io.open(destination, mode="<STR_LIT:wb>") as file_out,self.download_stream(source) as stream:<EOL><INDENT>async for block in stream.iter_by_block(block_size):<EOL><INDENT>await file_out.write(block)<EOL><DEDENT><DEDENT><DEDENT>elif await self.is_dir(source):<EOL><INDENT>await self.path_io.mkdir(destination, parents=True, exist_ok=True)<EOL>for name, info in (await self.list(source)):<EOL><INDENT>full = destination / name.relative_to(source)<EOL>if info["<STR_LIT:type>"] in ("<STR_LIT:file>", "<STR_LIT>"):<EOL><INDENT>await self.download(name, full, write_into=True,<EOL>block_size=block_size)<EOL><DEDENT><DEDENT><DEDENT>
:py:func:`asyncio.coroutine`

High level download method for downloading files and directories
recursively and save them to the file system.

:param source: source path of file or directory on server side
:type source: :py:class:`str` or :py:class:`pathlib.PurePosixPath`

:param destination: destination path of file or directory on client
    side
:type destination: :py:class:`str` or :py:class:`pathlib.Path`

:param write_into: write source into destination (if you want download
    file and change it name, as well with directories)
:type write_into: :py:class:`bool`

:param block_size: block size for transaction
:type block_size: :py:class:`int`