A list of the final component's suffixes, if any. These include the leading periods. For example: ['.tar', '.gz']
(self)
| 131 | |
| 132 | @property |
| 133 | def suffixes(self): |
| 134 | """ |
| 135 | A list of the final component's suffixes, if any. |
| 136 | |
| 137 | These include the leading periods. For example: ['.tar', '.gz'] |
| 138 | """ |
| 139 | split = self.parser.splitext |
| 140 | stem, suffix = split(self.name) |
| 141 | suffixes = [] |
| 142 | while suffix: |
| 143 | suffixes.append(suffix) |
| 144 | stem, suffix = split(stem) |
| 145 | return suffixes[::-1] |
| 146 | |
| 147 | @property |
| 148 | def stem(self): |