umr-lops / xarray-safe-rcm

Read RADARSAT Constellation Mission (RCM) SAFE files using xarray
https://xarray-safe-rcm.readthedocs.io
MIT License
3 stars 3 forks source link

use `fsspec`'s `dirfs` instead of relying on internal functions #55

Closed keewis closed 1 year ago

keewis commented 1 year ago

fsspec provides a filesystem implementation called dirfs which allows using a filesystem object with mapper keys. This allows us to avoid using fsspec's internal API to construct the urls to be passed to the filesystem object's methods.

As soon as it's merged, we could also use mapper.dirfs.open(...) instead of creating our own, but that would require us to depend on a unreasonably new version of fsspec.