Class ZipFile
- Namespace
- Dynamicweb.Content.Files
- Assembly
- Dynamicweb.dll
Zips and unzip files and folders
[Obsolete("Do not use")]
public class ZipFile
- Inheritance
-
ZipFile
- Inherited Members
Methods
Extract(string, bool)
Extracts the specified physical path.
public static bool Extract(string physicalPath, bool createDirectory)
Parameters
Returns
Extract(string, bool, RenameFileDelegate)
Extracts the specified physical path.
public static bool Extract(string physicalPath, bool createDirectory, ZipFile.RenameFileDelegate renameFileDelegate)
Parameters
physicalPath
string- The physical path.
createDirectory
bool- if set to
true
[create directory]. renameFileDelegate
ZipFile.RenameFileDelegate
Returns
ZipFiles(IEnumerable<string>, string)
Zips the specified files to new/existing archive
public static bool ZipFiles(IEnumerable<string> files, string zipPath)
Parameters
files
IEnumerable<string>- The files collection to be added to zip
zipPath
string- The destination zip file
Returns
ZipFolder(DirectoryInfo, FileInfo)
Zips the content of a folder
public static bool ZipFolder(DirectoryInfo folder, FileInfo zipFile)
Parameters
folder
DirectoryInfo- The folder which content will be compressed
zipFile
FileInfo- The destination zip file
Returns
ZipFolder(DirectoryInfo, string)
Zips the content of the given folder and places the zip inside that same folder
public static bool ZipFolder(DirectoryInfo folder, string zipFileName)
Parameters
folder
DirectoryInfo- The folder which content will be compressed
zipFileName
string- The name of the zip file