diff options
Diffstat (limited to 'mesonbuild/mesonlib/universal.py')
-rw-r--r-- | mesonbuild/mesonlib/universal.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/mesonbuild/mesonlib/universal.py b/mesonbuild/mesonlib/universal.py index 94dc0a9..160cc37 100644 --- a/mesonbuild/mesonlib/universal.py +++ b/mesonbuild/mesonlib/universal.py @@ -422,8 +422,11 @@ class File(HoldableObject): def endswith(self, ending: str) -> bool: return self.fname.endswith(ending) - def split(self, s: str) -> T.List[str]: - return self.fname.split(s) + def split(self, s: str, maxsplit: int = -1) -> T.List[str]: + return self.fname.split(s, maxsplit=maxsplit) + + def rsplit(self, s: str, maxsplit: int = -1) -> T.List[str]: + return self.fname.rsplit(s, maxsplit=maxsplit) def __eq__(self, other: object) -> bool: if not isinstance(other, File): |