diff --git a/src/dvc_objects/fs/implementations/gs.py b/src/dvc_objects/fs/implementations/gs.py index 334a2bb..e797be1 100644 --- a/src/dvc_objects/fs/implementations/gs.py +++ b/src/dvc_objects/fs/implementations/gs.py @@ -23,3 +23,12 @@ def fs(self): from gcsfs import GCSFileSystem return GCSFileSystem(**self.fs_args) + + @classmethod + def _strip_protocol(cls, path: str) -> str: + from fsspec.utils import infer_storage_options + + return infer_storage_options(path)["path"] + + def unstrip_protocol(self, path: str) -> str: + return "gs://" + path.lstrip("/")