Skip to content

Commit

Permalink
index: introduce DataIndexEntry.isdir (#446)
Browse files Browse the repository at this point in the history
  • Loading branch information
efiop authored Sep 28, 2023
1 parent deb8281 commit e3492b3
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/dvc_data/index/index.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,13 @@ class DataIndexEntry:

loaded: Optional[bool] = None

@property
def isdir(self) -> bool:
if self.meta:
return self.meta.isdir

return False

@classmethod
def from_dict(cls, d: Dict[str, Dict]) -> "DataIndexEntry":
ret = cls()
Expand Down

0 comments on commit e3492b3

Please sign in to comment.