Some file formats and backends, like .tar files, Git, or Google Cloud Storage, store objects in a flat namespace rather than a tree of directory/file entries. These systems:
Do not require directory entries (e.g. .tar), and may not support them (e.g. Git, GCS)
Natively support enumeration of all files (perhaps under a certain prefix)
Require us to filter the list of all objects in order to implement iterdir()
We could provide a version of PathBase that adds an abstract itertree() method and implements iterdir(), glob() and rglob() by immediately calling itertree() and filtering results.
Some file formats and backends, like
.tar
files, Git, or Google Cloud Storage, store objects in a flat namespace rather than a tree of directory/file entries. These systems:.tar
), and may not support them (e.g. Git, GCS)iterdir()
We could provide a version of
PathBase
that adds an abstractitertree()
method and implementsiterdir()
,glob()
andrglob()
by immediately callingitertree()
and filtering results.