13 Mar 2021 17:49:46 UTC
- Distribution: Path-Tiny-Archive-Tar
- Module version: 0.003
- Source (raw)
- Browse (raw)
- How to Contribute
- Issues (0)
- Testers (36 / 0 / 0)
- KwaliteeBus factor: 1
- 84.71% Coverage
- License: perl_5
- Perl: v5.8.0
- Activity24 month
- Download (11.77KB)
- MetaCPAN Explorer
- Subscribe to distribution
- This version
- Latest versionDIONYS Денис Ибаевand 1 contributors
- Denis Ibaev
Path::Tiny::Archive::Tar - Tar/untar add-on for file path utility
use Path::Tiny use Path::Tiny::Archive::Tar qw( :const ); path("foo/bar.txt")->tar("foo/bar.tgz", COMPRESSION_GZIP); path("foo/bar.zip")->untar("baz");
This module provides two additional methods for Path::Tiny for working with tar archives.
path("/tmp/foo.txt")->tar("/tmp/foo.tar"); path("/tmp/foo")->tar("/tmp/foo.tar.gz", COMPRESSION_GZIP);
Creates a tar archive and appends a file or directory tree to it. Returns the path to the archive or undef.
You can choose different compression types and levels.
The types and levels given can be:
COMPRESSION_NONE: No compression. This is the type that will be used if not specified.
COMPRESSION_GZIP: Compress using
9: This is
gzipcompression levels. 1 gives the best speed and worst compression, and 9 gives the best compression and worst speed.
COMPRESSION_GZIP_NONE: This is a synonym for
gziplevel 0. No compression.
COMPRESSION_GZIP_FASTEST: This is a synonym for
COMPRESSION_GZIP_BEST: This is a synonym for
COMPRESSION_GZIP_DEFAULT: This gives a good compromise between speed and compression for
gzip, and is currently equivalent to 6 (this is in the zlib code). This is a synonym for
COMPRESSION_BZIP2: Compress using
tgzis synonym for
tbz2is synonym for
Extracts a tar archive to specified directory. Returns the path to the destination directory or undef.
Denis Ibaev <email@example.com>
This software is copyright (c) 2021 by Denis Ibaev.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
Module Install Instructions
To install Path::Tiny::Archive::Tar, copy and paste the appropriate command in to your terminal.
perl -MCPAN -e shell install Path::Tiny::Archive::Tar
For more information on module installation, please visit the detailed CPAN module installation guide.