universal_pathlib
universal_pathlib copied to clipboard
Allow selecting urlpath chain segment
There needs to be some way to select which chain segment UPath will operate on. Need to think through how this will work.
>>> p0 = UPath("zip://abc/efg.csv::s3://bucket/file.zip")
>>> p0
S3Path("zip://abc/efg.csv::s3://bucket/file.zip")
>>> p1 = p0.chain[-2] # maybe this?
>>> p1 = p0.chain_target("zip") # or maybe this?
>>> p1
ZipPath("zip://abc/efg.csv::s3://bucket/file.zip")