Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to uncompress .7z files in elixir/erlang

Tags:

erlang

elixir

I am working on a problem which requires my system to uncompress .7z files in elixir/erlang.

Is there any such library that can uncompress .7z file in erlang or elixir? Or any method to do the same?

TIA :)

like image 809
Kshitij Mittal Avatar asked Dec 04 '25 13:12

Kshitij Mittal


2 Answers

I guess that the best and simplest way for doing it is by running the right system command to uncompress the file.
You can do this using os:cmd/1:

In case you just want to uncompress to the working directory, just run this command:

os:cmd("7za x File.7z").

For more information about how to use 7z in command line see this or this.

Note: You just need to make sure you have the right 7z utility according to your OS.

like image 104
A. Sarid Avatar answered Dec 07 '25 15:12

A. Sarid


You might also want to check out this Erlang module as well. http://erlang.org/doc/man/zip.html

like image 40
Onorio Catenacci Avatar answered Dec 07 '25 15:12

Onorio Catenacci



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!