Note: This API documentation is for FAKE version 4. The migration API documentation can be found here. The API documentation for the new fake 5 modules can be found here

GZip

Operations and tasks for working with tar archives compressed with GZip.

Functions and values

Function or valueDescription
compress(gzipParam)
Signature: gzipParam:GZipCompressionParams -> FileInfo -> seq<ArchiveFileSpec> -> unit

Constructs a function that will create a tar.gz archive from a set of files.

Compress(...)
Signature: setParams:(GZipCompressionParams -> GZipCompressionParams) -> flatten:bool -> baseDir:DirectoryInfo -> archiveFile:FileInfo -> files:seq<FileInfo> -> unit

Creates a tar.gz archive with the given files.

Parameters

  • setParams - A function which modifies the default compression parameters.
  • flatten - If set to true then all subfolders are merged into the root folder of the archive.
  • baseDir - The relative directory of the files to be compressed. Use this parameter to influence directory structure within the archive.
  • archiveFile - The output archive file. If existing, will be overwritten.
  • files - A sequence of files to compress.
CompressDir(...)
Signature: setParams:(GZipCompressionParams -> GZipCompressionParams) -> flatten:bool -> baseDir:DirectoryInfo -> archiveFile:FileInfo -> unit

Creates a tar.gz archive containing all the files in a directory.

Parameters

  • setParams - A function which modifies the default compression parameters.
  • flatten - If set to true then all subfolders are merged into the root folder of the archive.
  • baseDir - The base directory to be compressed. This directory will be the root of the resulting archive.
  • archiveFile - The output archive file. If existing, will be overwritten.
CompressDirWithDefaults(...)
Signature: baseDir:DirectoryInfo -> archiveFile:FileInfo -> unit

Creates a tar.gz archive containing all the files in a directory.

Parameters

  • baseDir - The base directory to be compressed. This directory will be the root of the resulting archive.
  • archiveFile - The output archive file. If existing, will be overwritten.
CompressSpecs(...)
Signature: setParams:(GZipCompressionParams -> GZipCompressionParams) -> archiveFile:FileInfo -> fileSpecs:seq<ArchiveFileSpec> -> unit

Creates a tar.gz archive with the given archive file specifications.

Parameters

  • setParams - A function which modifies the default compression parameters.
  • archiveFile - The output archive file. If existing, will be overwritten.
  • fileSpecs - A sequence of archive file specifications.
compressStream(gzipParams)
Signature: gzipParams:GZipCompressionParams -> Stream -> TarOutputStream

Wraps an output stream with a tar.gz compressor.

CompressWithDefaults(...)
Signature: baseDir:DirectoryInfo -> archiveFile:FileInfo -> files:seq<FileInfo> -> unit

Creates a tar.gz archive with the given files with default parameters.

Parameters

  • baseDir - The relative directory of the files to be compressed. Use this parameter to influence directory structure within the archive.
  • archiveFile - The output archive file. If existing, will be overwritten.
  • files - A sequence of files to compress.
createFile gzipParams file
Signature: gzipParams:GZipCompressionParams -> file:FileInfo -> TarOutputStream

Creates a TarOutputStream wrapping a file using the given parameters.

Parameters

  • gzipParams - The gzip compression parameters.
  • file - The FileInfo describing the location to which the archive should be written. Will be overwritten if it exists.
Extract extractDir archiveFile
Signature: extractDir:DirectoryInfo -> archiveFile:FileInfo -> unit

Extracts a tar.gz archive to a given directory.

Parameters

  • extractDir - The directory into which the archived files will be extracted.
  • archiveFile - The archive to be extracted.
extractStream
Signature: Stream -> TarInputStream

Wraps an input stream with a tar.gz decompressor.