caterva2.Dataset.download#
- Dataset.download(localpath=None)#
Download a file to storage.
- Parameters:
localpath¶ (Path) – The path to download the file to. If not provided, 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')