tar

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 9, 2015 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Overview

Package tar provides functions to create or extract tar archives.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Create

func Create(destPath, dirPath string) error

Create creates a tar archive from a directory. The resulting tar archive format is in POSIX.1 format.

func CreateInPlace

func CreateInPlace(dirPath string) error

CreateInPlace creates a tar archive from a directory in place which means that the original directory is removed after the tar archive is created. The .tar suffix will be added to dirPath once the archive is created.

func Extract

func Extract(destPath, archivePath string) error

Extract extracts a tar archive given its path.

func ExtractInPlace

func ExtractInPlace(archivePath string) error

ExtractInPlace extracts a tar archive, in place, given its path. The original tar archive is removed after extraction and only its content remains. Note that archivePath is expected to have a file extension.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL