aicsimageio.utils package

Submodules

aicsimageio.utils.io_utils module

aicsimageio.utils.io_utils.pathlike_to_fs(uri: Union[str, Path], enforce_exists: bool = False, fs_kwargs: Dict[str, Any] = {}) Tuple[AbstractFileSystem, str][source]

Find and return the appropriate filesystem and path from a path-like object.

Parameters
  • uri (PathLike) – The local or remote path or uri.

  • enforce_exists (bool) – Check whether or not the resource exists, if not, raise FileNotFoundError.

Returns

  • fs (AbstractFileSystem) – The filesystem to operate on.

  • path (str) – The full path to the target resource.

  • fs_kwargs (Dict[str, Any]) – Any specific keyword arguments to pass down to the fsspec created filesystem. Default: {}

Raises

FileNotFoundError – If enforce_exists is provided value True and the resource is not found or is unavailable.

Module contents