TarFS

Use TarFS to read and write .tar files.

Here's how you could create a tar file:

>>> from fs import open_fs
>>> with open_fs('tar://test.tar.gz', create=True) as tarfs:
...     tarfs.settext('foo', 'bar')

And here is how you would read it back.

>>> from fs import open_fs
>>> with open_fs('tar://test.tar.gz') as tarfs:
...     print(tarfs.gettext('foo'))
'bar'

See TarFS docs for more information.

Author
Will McGugan
Published
Aug 17, 2017
Revision
1