ZipCreator 1.0.1
dotnet add package ZipCreator --version 1.0.1
NuGet\Install-Package ZipCreator -Version 1.0.1
<PackageReference Include="ZipCreator" Version="1.0.1" />
paket add ZipCreator --version 1.0.1
#r "nuget: ZipCreator, 1.0.1"
// Install ZipCreator as a Cake Addin #addin nuget:?package=ZipCreator&version=1.0.1 // Install ZipCreator as a Cake Tool #tool nuget:?package=ZipCreator&version=1.0.1
BugSplat
Crash and error reporting built for busy developers.
👋 Introduction
ZipCreator is a .NET Standard 2.0 library for creating zip files from glob patterns.
⚙️ Installation
The ZipCreator
library can be added to your project via NuGet.
Install-Package ZipCreator
🏗️ Usage
Add a using statement for the ZipCreator
namespace
using ZipCreator;
Create an instance of Zip
from a text file that contains a list of filters separated by new lines.
var zip = Zip.CreateFromFile("input.txt");
You can also create an instances of Zip
with the default constructor and set the Settings
properties according to your use case.
var zip = new Zip();
zip.Settings.Filters = new List<string>() { "path/to/folder/**/*" };
zip.Settings.Interceptors.Add((fileInfo) => Console.WriteLine(fileInfo.FullName));
zip.Settings.Output = new FileInfo(pathToOutputZip);
zip.Settings.Overwrite = true;
The Filters
property accepts a list of path globs. You can also exclude patterns by prefixing the pattern with a !
.
zip.Settings.Filters = new List<string>()
{
"path/to/folder/**/*",
"!path/to/folder/exclude.txt"
};
The Interceptors
property is a List<Action<FileInfo>>
containting actions that get invoked with each file before it is added to the zip.
zip.Settings.Interceptors.Add((fileInfo) => SignTool(fileInfo.FullName));
The Overwrite
property controls whether the Output
file should be overwritten if it exists. If Overwrite
is false the call to MakeZips
will return ZipResult.OverwriteError
if the output file exists.
zip.Settings.Overwrite = true
The collection of files that will be operated on can be accessed via the readonly Files
property.
var files = zip.Files;
Finally, call Write
to create a .zip
file and write it to the location specified in Settings.Output
.
var result = zip.Write();
🐛 About
BugSplat is a software crash and error reporting service with support for Windows C++, .NET Framework, dotnet and many more. BugSplat automatically captures critical diagnostic data such as stack traces, log files, and other runtime information. BugSplat also provides automated incident notifications, a convenient dashboard for monitoring trends and prioritizing engineering efforts, and integrations with popular development tools to maximize productivity and ship more profitable software.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
.NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.