Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
How to handle decompression of symbolic links? #71
There's not really a simple way of doing this now, but there should be. You might be able to do it with using TarDecoder directly. You'd use GzipDecoder to decompress the file first, then TarDecoder.decodeBytes with the decompressed buffer. Then, TarDecoder.files has a list of TarFile objects with Tar specific information about the files. TarFile.typeFlag would probably be TarFile.TYPE_SYMBOLIC_LINK if it's a symlink, and TarFile.nameOfLinkedFile would probably be the name of the file it's linked to.
I'm saying "probably" because I'm not at a place where I can test to verify if I'm right or not.
ArchiveFile should really have symlink information available to it, so I'll work on that sometime soon.
I got a chance to check on this, and I was right, those properties of TarFile did have the symbolic link info.
I added some properties to ArchiveFile so you can get the symlink info from there:
nameOfLinkedFile is the path of the file linked to, relative to the symlink file.
The changes are in git, but not published yet.