Skip to content

Commit

Permalink
[path-] make Path.name same as .base_stem for now
Browse files Browse the repository at this point in the history
  • Loading branch information
saulpw committed Dec 24, 2023
1 parent 3f833b8 commit 6495ac0
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions visidata/path.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,11 @@ def __init__(self, given, fp=None, fptext=None, lines=None, filesize=None):
self.filesize = filesize
self.rfile = None

@property
def name(self):
'Filename without any extensions. Not the same as pathlib.Path.'
return self.base_stem

@lru_cache()
def stat(self, force=False):
return self._path.stat()
Expand Down

0 comments on commit 6495ac0

Please sign in to comment.