Note: This is the migration API reference for FAKE 5. The new (modularized) API documentation can be found here. If the API is already migrated you can check here if exists in a module. More information regarding the migration can be found here

OBSOLETE

Use Fake.IO.Zip instead

ZipHelper

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

Functions and values

Function or valueDescription
addZipEntry stream buffer item itemSpec
Signature: stream:ZipOutputStream -> buffer:byte [] -> item:string -> itemSpec:string -> unit
createZip fileName comment level items
Signature: fileName:string -> comment:string -> level:int -> items:seq<string * string> -> unit
CreateZip(...)
Signature: workingDir:string -> fileName:string -> comment:string -> level:int -> flatten:bool -> files:seq<string> -> unit
Attributes:
[<Obsolete("Use Fake.IO.Zip instead")>]
OBSOLETE

Use Fake.IO.Zip instead

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.
CreateZipOfIncludes(...)
Signature: fileName:string -> comment:string -> level:int -> files:seq<string * FileIncludes> -> unit
Attributes:
[<Obsolete("Use Fake.IO.Zip instead")>]
OBSOLETE

Use Fake.IO.Zip instead

Creates a zip file with the given files.

Parameters

  • fileName - The file name of the resulting zip file.
  • comment - A comment for the resulting zip file.
  • level - The compression level.
  • files - A sequence of target folders and files to include relative to their base directory.
DefaultZipLevel
Signature: int
Attributes:
[<Obsolete("Use Fake.IO.Zip instead")>]
OBSOLETE

Use Fake.IO.Zip instead

The default zip level

Unzip target fileName
Signature: target:string -> fileName:string -> unit
Attributes:
[<Obsolete("Use Fake.IO.Zip instead")>]
OBSOLETE

Use Fake.IO.Zip instead

Unzips a file with the given file name.

Parameters

  • target - The target directory.
  • fileName - The file name of the zip file.
UnzipFirstMatchingFileInMemory(...)
Signature: predicate:(ZipEntry -> bool) -> zipFileName:string -> string
Attributes:
[<Obsolete("Use Fake.IO.Zip instead")>]
OBSOLETE

Use Fake.IO.Zip instead

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
Attributes:
[<Obsolete("Use Fake.IO.Zip instead")>]
OBSOLETE

Use Fake.IO.Zip instead

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
Attributes:
[<Obsolete("Use Fake.IO.Zip instead")>]
OBSOLETE

Use Fake.IO.Zip instead

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
Attributes:
[<Obsolete("Use Fake.IO.Zip instead")>]
OBSOLETE

Use Fake.IO.Zip instead

Creates a zip file with the given file.

Parameters

  • fileName - The file name of the resulting zip file.
  • targetFileName - The file to zip.
ZipOfIncludes fileName files
Signature: fileName:string -> files:seq<string * FileIncludes> -> unit
Attributes:
[<Obsolete("Use Fake.IO.Zip instead")>]
OBSOLETE

Use Fake.IO.Zip instead

Creates a zip file with the given files.

Parameters

  • fileName - The file name of the resulting zip file.
  • files - A sequence of target folders and files to include relative to their base directory.

Sample

The following sample creates a zip file containing the files from the two target folders and FileIncludes.

  • The files from the first FileInclude will be placed in the root of the zip file.
  • The files from the second FileInclude will be placed under the directory app_data\jobs\continuous\MyWebJob in the zip file.
 1: 
 2: 
 3: 
 4: 
 5: 
 6: 
 7: 
 8: 
 9: 
10: 
11: 
12: 
13: 
Target "Zip" (fun _ ->
    [   "", !! "MyWebApp/*.html"
            ++ "MyWebApp/bin/**/*.dll"
            ++ "MyWebApp/bin/**/*.pdb"
            ++ "MyWebApp/fonts/**"
            ++ "MyWebApp/img/**"
            ++ "MyWebApp/js/**"
            -- "MyWebApp/js/_references.js"
            ++ "MyWebApp/web.config"
        @"app_data\jobs\continuous\MyWebJob", !! "MyWebJob/bin/Release/*.*"
    ]
    |> ZipOfIncludes (sprintf @"bin\MyWebApp.%s.zip" buildVersion)
)
val sprintf : format:Printf.StringFormat<'T> -> 'T