Skip to content

Commit

Permalink
Docs
Browse files Browse the repository at this point in the history
  • Loading branch information
willmcgugan committed Apr 28, 2018
1 parent 639ced1 commit fd908a0
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions fs/info.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,8 +185,8 @@ def name(self):
@property
def suffix(self):
# type: () -> Text
"""`str`: the final resource extension (including dot), or an
empty string if there is no extension.
"""`str`: the last component of the name (including dot), or an
empty string if there is no suffix.
Example:
>>> info
Expand All @@ -203,7 +203,7 @@ def suffix(self):
@property
def suffixes(self):
# type: () -> List[Text]
"""`List`: a list of the resource's extensions.
"""`List`: a list of any suffixes in the name.
Example:
>>> info
Expand All @@ -219,7 +219,15 @@ def suffixes(self):
@property
def stem(self):
# type: () -> Text
"""`str`: the name minus any extensions."""
"""`str`: the name minus any suffixes.
Example:
>>> info
<info 'foo.tar.gz'>
>>> info.stem
'foo'
"""
name = self.get('basic', 'name')
if name.startswith('.'):
return name
Expand Down

0 comments on commit fd908a0

Please sign in to comment.