MemoTar
You must have gotten truly lost to end up here. This is an Elixir library for creating tar archives in memory.
Usage
To create a tar archive in memory:
{:ok, binary} = MemoTar.create([{"foo.txt", "Hello World"}])You can also add files one at a time. However, this also currently requires that directories are added manually:
{:ok, tar} = MemoTar.open()
:ok = MemoTar.add_directory(tar, "foo")
:ok = MemoTar.add_file(tar, "foo/bar.txt", "Hello World")
{:ok, binary} = MemoTar.close(tar)Installation
Available in Hex, the package can be installed
by adding memo_tar to your list of dependencies in mix.exs:
def deps do
[
{:memo_tar, "~> 0.1.0"}
]
endIn-depth docs can be found at https://hexdocs.pm/memo_tar.