barneygale / pathlib-abc

Python base classes for rich path objects
Other
26 stars 1 forks source link

Better support for flat namespaces #21

Open barneygale opened 8 months ago

barneygale commented 8 months ago

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:

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.