caterva2.Dataset.download#

Dataset.download(localpath=None)#

Downloads the file to storage.

Parameters:

localpath (Path, optional) – The destination path for the downloaded file. If not specified, the file will be downloaded to the current working directory.

Returns:

The path to the downloaded file.

Return type:

Path

Examples

>>> import caterva2 as cat2
>>> root = cat2.Root('example', 'https://demo.caterva2.net')
>>> file = root['ds-1d.b2nd']
>>> file.download()
PosixPath('example/ds-1d.b2nd')
>>> file.download('mydir/myarray.b2nd')
PosixPath('mydir/myarray.b2nd')