From 11e9ffea794dec52f508d4a93f18d3a4f0965d84 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filipe=20La=C3=ADns?= Date: Tue, 28 May 2024 16:58:31 +0100 Subject: [PATCH] readers: add MultiplexedPath.paths MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Filipe LaĆ­ns --- importlib_resources/readers.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/importlib_resources/readers.py b/importlib_resources/readers.py index 4a80a77..7c85177 100644 --- a/importlib_resources/readers.py +++ b/importlib_resources/readers.py @@ -72,6 +72,10 @@ def __init__(self, *paths): if not all(path.is_dir() for path in self._paths): raise NotADirectoryError('MultiplexedPath only supports directories') + @property + def paths(self): + return self._paths.copy() + def iterdir(self): children = (child for path in self._paths for child in path.iterdir()) by_name = operator.attrgetter('name')