JuliaIO / Tar.jl

TAR files: create, list, extract them in pure Julia
MIT License
79 stars 19 forks source link

refactor read_tarball to share tree construction logic #64

Open StefanKarpinski opened 4 years ago

StefanKarpinski commented 4 years ago

Multiple usages of read_tarball now effectively want a tree representation of the tarball structure—tree hashing & symlink copying, in particular. Currently symlink copying doesn't build a tree and instead does a lot of splitting and joining on slashes, which is annoying and inefficient. The tree hashing code builds a tree for itself, but this same approach could probably be shared, simplifying both use cases.