Skip to content

Commit

Permalink
readers: add MultiplexedPath.paths
Browse files Browse the repository at this point in the history
Signed-off-by: Filipe Laíns <[email protected]>
  • Loading branch information
FFY00 committed May 28, 2024
1 parent 2c30c8a commit 11e9ffe
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions importlib_resources/readers.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down

0 comments on commit 11e9ffe

Please sign in to comment.