caterva2.Root.__contains__#

Root.__contains__(path)#

Check if a path exists in the root.

Parameters:

path (str or Path) – The path of the file or dataset.

Returns:

Whether the path exists in the root.

Return type:

bool

Examples

>>> import caterva2 as cat2
>>> root = cat2.Root('example', 'https://demo.caterva2.net')
>>> 'ds-1d.b2nd' in root
True