FAKE - F# Make


ZipHelper

This module contains helper function to create and extract zip archives.

Functions and values

Function or valueDescription
CreateZip (...)
Signature: workingDir:string -> fileName:string -> comment:string -> level:int -> flatten:bool -> files:seq<string> -> unit

Creates a zip file with the given files

Parameters

  • workingDir - The relative dir of the zip files. Use this parameter to influence directory structure within zip file.
  • fileName - The fileName of the resulting zip file.
  • comment - A comment for the resulting zip file.
  • level - The compression level.
  • flatten - If set to true then all subfolders are merged into the root folder.
  • files - A sequence with files to zip.
DefaultZipLevel
Signature: int

The default zip level

Unzip target fileName
Signature: target:string -> fileName:string -> unit

Unzips a file with the given file name.

Parameters

  • target - The target directory.
  • fileName - The file name of the zip file.
UnzipFirstMatchingFileInMemory (...)
Signature: predicate:((type) -> bool) -> zipFileName:string -> string

Unzips a single file from the archive with the given file name.

Parameters

  • predicate - The predictae for the searched file in the archive.
  • zipFileName - The file name of the zip file.
UnzipSingleFileInMemory (...)
Signature: fileToUnzip:string -> zipFileName:string -> string

Unzips a single file from the archive with the given file name.

Parameters

  • fileToUnzip - The file inside the archive.
  • zipFileName - The file name of the zip file.
Zip workingDir fileName files
Signature: workingDir:string -> fileName:string -> files:seq<string> -> unit

Creates a zip file with the given files.

Parameters

  • workingDir - The relative dir of the zip files. Use this parameter to influence directory structure within zip file.
  • fileName - The file name of the resulting zip file.
  • files - A sequence with files to zip.
ZipFile fileName targetFileName
Signature: fileName:string -> targetFileName:string -> unit

Creates a zip file with the given file.

Parameters

  • fileName - The file name of the resulting zip file.
  • targetFileName - The file to zip.
Fork me on GitHub