Lines Matching refs:suffix
631 def suffix(self):
633 The final component's last suffix, if any.
655 return ['.' + suffix for suffix in name.split('.')[1:]]
659 """The final path component, minus its last suffix."""
680 return self.with_name(stem + self.suffix)
682 def with_suffix(self, suffix):
683 """Return a new path with the file suffix changed. If the path
684 has no suffix, add given suffix. If the given suffix is an empty
685 string, remove the suffix from the path.
688 if f.sep in suffix or f.altsep and f.altsep in suffix:
689 raise ValueError("Invalid suffix %r" % (suffix,))
690 if suffix and not suffix.startswith('.') or suffix == '.':
691 raise ValueError("Invalid suffix %r" % (suffix))
695 old_suffix = self.suffix
697 name = name + suffix
699 name = name[:-len(old_suffix)] + suffix