Skip to content

Commit

Permalink
Expose the number of blocks of an inode
Browse files Browse the repository at this point in the history
  • Loading branch information
twiggler committed Oct 2, 2024
1 parent b95970a commit 030dffb
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions dissect/xfs/xfs.py
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,10 @@ def _has_large_extent_counts(self) -> bool:
def size(self) -> int:
return self.inode.di_size

@property
def number_of_blocks(self) -> int:
return self.inode.di_nblocks

@property
def data_extents(self) -> int:
if self._has_large_extent_counts():
Expand Down

0 comments on commit 030dffb

Please sign in to comment.