Extract tar.xz in C / C ++

I am writing a program that downloads tar.xz files from a server and extracts them in a specific location. I try my best to find the remote tar.xz file in a specific place. I use Qt, so a more Qt way to do this would be useful, but I don't mind.

+3
source share
1 answer

Qt has no archive support. You can either take a look at the KDE library, which offers support for virtual file systems, or you can use it QProcessfor a direct call tar. Use -C <dir>(uppercase C) to specify the directory to extract.

[EDIT] There is also libtar (BSD license).

+1

Source: https://habr.com/ru/post/1756740/


All Articles