Skip to content

Commit

Permalink
fs: support version_aware filesystems
Browse files Browse the repository at this point in the history
  • Loading branch information
pmrowla authored and efiop committed Aug 31, 2022
1 parent 296bde2 commit 966d4e3
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/dvc_objects/fs/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@

from fsspec.spec import AbstractFileSystem

from .path import Path


logger = logging.getLogger(__name__)

Expand Down Expand Up @@ -88,7 +90,7 @@ def root_marker(self) -> str:
return self.fs.root_marker

@cached_property
def path(self):
def path(self) -> "Path":
from .path import Path

def _getcwd():
Expand All @@ -107,6 +109,10 @@ def unstrip_protocol(self, path: str) -> str:
def fs(self) -> "AbstractFileSystem": # pylint: disable=method-hidden
raise NotImplementedError

@cached_property
def version_aware(self) -> bool:
return getattr(self.fs, "version_aware", False)

@staticmethod
def _get_kwargs_from_urls(urlpath: str) -> "Dict[str, Any]":
from fsspec.utils import infer_storage_options
Expand Down

0 comments on commit 966d4e3

Please sign in to comment.