is_remote#

rojak.core.sources.is_remote(urlpath)[source]#

Whether urlpath refers to a non-local filesystem

Parameters:

urlpath (str | Path) – Local path or fsspec URL

Returns:

True if the URL’s protocol is anything other than the local filesystem

Return type:

bool

Examples

>>> is_remote("~/data/era5")
False
>>> is_remote("file:///data/era5")
False
>>> is_remote("s3://bucket/era5")
True