Project

memtar

0.0
No release in over 3 years
Low commit activity in last 3 years
There's a lot of open issues
In-memory tar archive creation
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.7
~> 13.0
~> 3.2

Runtime

~> 0.8
 Project Readme

MemTar

In-memory tar archive creation

Installation

Add this line to your application's Gemfile:

gem 'memtar'

And then execute:

$ bundle

Or install it yourself as:

$ gem install memtar

Usage

require 'memtar'

archive = MemTar.new
archive.default[:uname] = "nobody"

archive.add_file "foo", "content", mode: 0640
archive.add_file "bar/baz", "hi!"
archive.add_symlink "bar/xyzzy", "baz"
archive.add_file "this", File.new("/etc/passwd") # copies attributes and content

File.write "test.tar", archive.to_s

Contributing

We welcome contributions of all kinds to this repository. For instructions on how to get started and descriptions of our development workflows, please see our contributing guide.