◐ Shell
clean mode source ↗

Message 409479 - Python tracker

It's possible to do, but will be a little slow due to the nature of tar files. They're a big linked list of files, so you need to do a bunch of reads/seeks from the start to the end to enumerate all files.

I'd ask that we try to get issue24132 solved first. That would let us write:

    # tarfile.py
    class Path(pathlib.AbstractPath):
        def iterdir(self):
            ...
        def stat(self):
            ...

We'd fill in a smallish number of abstract methods to get a full `Path`-compatible class with `read_text()`, `is_symlink()` etc methods.