Zip Module
This module contains helper function to create and extract zip archives.
Functions and values
Function or value | Description |
Full Usage:
Zip.DefaultZipLevel
Returns: int
|
|
Full Usage:
Zip.createZip workingDir fileName comment level flatten files
Parameters:
string
-
The relative dir of the zip files. Use this parameter to influence directory structure
within zip file.
fileName : string
-
The fileName of the resulting zip file.
comment : string
-
A comment for the resulting zip file (currently ignored in fake 5 and above).
level : int
-
The compression level.
flatten : bool
-
If set to true then all subfolders are merged into the root folder.
files : seq<string>
-
A sequence with files to zip.
|
|
Full Usage:
Zip.createZipOfIncludes fileName comment level files
Parameters:
string
-
The file name of the resulting zip file.
comment : string
-
A comment for the resulting zip file (currently ignored in fake 5 and above).
level : int
-
The compression level.
files : seq<string * IGlobbingPattern>
-
A sequence of target folders and files to include relative to their base directory.
|
|
Full Usage:
Zip.createZipSpec fileName comment level items
Parameters:
string
-
The fileName of the resulting zip file.
comment : string
-
A comment for the resulting zip file (currently ignored in fake 5 and above).
level : int
-
The compression level.
items : seq<string * string>
-
A sequence with files and their target location in the zip.
|
|
Full Usage:
Zip.filesAsSpecs workingDir files
Parameters:
string
-
The relative dir of the zip files. Use this parameter to influence directory structure
within zip file.
files : IGlobbingPattern
-
A sequence of target folders and files to include relative to their base directory.
Returns: seq<string * string>
|
This helper helps with creating complex zip file with multiple include patterns. This method will convert a given glob pattern with the given workingDir to a sequence of zip specifications.
ExampleThe following sample creates a zip file containing the files from multiple patterns and moves them to different folders within the zip file.
|
Full Usage:
Zip.filesAsSpecsFlatten files
Parameters:
IGlobbingPattern
-
A sequence of target folders and files to include relative to their base directory.
Returns: seq<string * string>
|
ExampleThe following sample creates a zip file containing the files from multiple patterns and moves them to different folders within the zip file.
|
Full Usage:
Zip.moveToFolder path items
Parameters:
string
items : seq<string * string>
Returns: seq<string * string>
|
This helper helps with creating complex zip file with multiple include patterns. This function will move a given list of zip specifications to the given folder (while keeping original folder structure intact).
ExampleThe following sample creates a zip file containing the files from multiple patterns and moves them to different folders within the zip file.
|
Full Usage:
Zip.unzip target fileName
Parameters:
string
-
The target directory.
fileName : string
-
The file name of the zip file.
|
|
Full Usage:
Zip.unzipFirstMatchingFileInMemory predicate zipFileName
Parameters:
ZipArchiveEntry -> bool
-
The predicate for the searched file in the archive.
zipFileName : string
-
The file name of the zip file.
Returns: string
|
|
Full Usage:
Zip.unzipSingleFileInMemory fileToUnzip zipFileName
Parameters:
string
-
The file inside the archive.
zipFileName : string
-
The file name of the zip file.
Returns: string
|
|
Full Usage:
Zip.zip workingDir fileName files
Parameters:
string
-
The relative dir of the zip files. Use this parameter to influence directory structure
within zip file.
fileName : string
-
The file name of the resulting zip file.
files : seq<string>
-
A sequence with files to zip.
|
|
Full Usage:
Zip.zipFile fileName targetFileName
Parameters:
string
-
The file name of the resulting zip file.
targetFileName : string
-
The file to zip.
|
|
Full Usage:
Zip.zipOfIncludes fileName files
Parameters:
string
-
The file name of the resulting zip file.
files : seq<string * IGlobbingPattern>
-
A sequence of target folders and files to include relative to their base directory.
|
ExampleThe following sample creates a zip file containing the files from the two target folders and FileIncludes.
|
Full Usage:
Zip.zipSpec fileName items
Parameters:
string
-
The fileName of the resulting zip file.
items : seq<string * string>
-
A sequence with files and their target location in the zip.
|
|