Skip to content

Instantly share code, notes, and snippets.

@dvhthomas
Created November 21, 2009 00:12
Show Gist options
  • Select an option

  • Save dvhthomas/239899 to your computer and use it in GitHub Desktop.

Select an option

Save dvhthomas/239899 to your computer and use it in GitHub Desktop.
Core Zipping interfaces
using System.IO;
namespace Woolpert.Compression
{
/// <summary>
/// Zips up files and folders
/// </summary>
public interface IZip
{
/// <summary>
/// Generates zip files
/// </summary>
/// <param name="zipFilePath">Path of zip file to create</param>
/// <param name="directoryToZip">The top level directory to zip up</param>
/// <param name="recursive">Would you like to zip up subdirectories as well?</param>
void GenerateZipFile(string zipFilePath, string directoryToZip, bool recursive);
/// <summary>
/// Extracts files from a zip archive
/// </summary>
/// <param name="zipFile">Path of the zip file to create or overwrite</param>
/// <param name="directoryToUnzipTo">The existing directory to put unzipped files into</param>
void UnzipZipFile(string zipFile, string directoryToUnzipTo);
/// <summary>
/// Compress a single file
/// </summary>
/// <param name="zipFilePath">The archive file to create or overwrite</param>
/// <param name="fileToCompress">The single file to compress</param>
void GenerateZipFile(string zipFilePath, FileInfo fileToCompress);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment