Documentation ¶
Overview ¶
Package for working with tar.gz files
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Compress ¶
Compress creates a archive from the folder inputFilePath points to in the file outputFilePath points to. Only adds the last directory in inputFilePath to the archive, not the whole path. It tries to create the directory structure outputFilePath contains if it doesn't exist. It returns potential errors to be checked or nil if everything works. - inputFilePath: the path to the folder to compress - outputFilePath: the path to the archive to create - returns: an error if there is one
func Extract ¶
Extract extracts a archive from the file inputFilePath points to in the directory outputFilePath points to. It tries to create the directory structure outputFilePath contains if it doesn't exist. It returns potential errors to be checked or nil if everything works. - inputFilePath: the path to the archive to extract - outputFilePath: the path to the folder to create - returns: an error if there is one
func ExtractFile ¶
ExtractFile It opens a gzip file, reads it as a tar file, and returns the contents of the file with the name you specify - filePath: the path to the archive to extract - file_name: the name of the file to extract - returns: the contents of the file with the name you specify - returns: an error if there is one
Types ¶
This section is empty.