@@ -54,6 +54,8 @@ class ResourcePath():
5454 Leading slashes are not matched literally.
5555 A pattern with a leading slash must match the entire path
5656 and not merely a suffix of the path.
57+
58+ .. versionadded:: 1.2
5759 """
5860
5961 @classmethod
@@ -262,6 +264,8 @@ def relative_to(self, *other):
262264 `other` will be converted to a :class:`ResourcePath`.
263265
264266 :raise ValueError: if this path is not a descendant of `other`.
267+
268+ .. versionadded:: 1.3
265269 """
266270 other_path = ResourcePath (* other )
267271 other_len = len (other_path .parts )
@@ -283,6 +287,8 @@ def with_name(self, name):
283287 def add_suffix (self , suffix ):
284288 """
285289 Return a new path with the suffix added.
290+
291+ .. versionadded:: 1.3
286292 """
287293 return self .with_name (self .name + suffix )
288294
@@ -297,6 +303,8 @@ def remove_suffix(self, suffix=None, *, must_remove=True):
297303
298304 :raise ValueError: if `must_remove` is ``True`` (the default)
299305 and no suffix can be removed.
306+
307+ .. versionadded:: 1.3
300308 """
301309 new_name = None
302310
@@ -436,6 +444,8 @@ def copy(self, target, exist_ok=True):
436444 :raise FileNotFoundError: if there is no resource at this path.
437445 :raise IsADirectoryError: if `target` is a directory.
438446 :raise FileExistsError: if `target` is a file and `exist_ok` is ``False``.
447+
448+ .. versionadded:: 1.3
439449 """
440450 if exist_ok :
441451 mode = 'w'
@@ -458,6 +468,8 @@ def copytree(self, target, exist_ok=False):
458468 then existing files under `target` will be overwritten.
459469
460470 :raise FileExistsError: if `target` already exists and `exist_ok` is ``False``.
471+
472+ .. versionadded:: 1.3
461473 """
462474 target = Path (target )
463475
0 commit comments