You can use something like the following, in other words, create the directory structure by hand:
using (var fs = new FileStream("1.zip", FileMode.Create))
using (var zip = new ZipArchive(fs, ZipArchiveMode.Create))
{
zip.CreateEntry("12/3/"); // just end with "https://stackoverflow.com/"
}
Related Contents:
- Create zip file from byte[]
- How do I make calls to a REST API using C#?
- Creating a ZIP archive in memory using System.IO.Compression
- How does Task become an int?
- Is it possible to run a .NET 4.5 app on XP?
- Await operator can only be used within an Async method [duplicate]
- HTTP HEAD request with HttpClient in .NET 4.5 and C#
- What can I do in C# 5 with .Net 4.5 that I couldn’t do in C# 4 with .Net 4? [closed]
- What are the differences between using ConfigureAwait(false) and Task.Run?
- Create normal zip file programmatically
- IList and IReadOnlyList
- recommend a library/API to unzip file in C# [closed]
- When should I use a List vs a LinkedList
- Storing WPF Image Resources
- Set object property using reflection
- Could not establish trust relationship for SSL/TLS secure channel — SOAP
- What Are Some Good .NET Profilers?
- What is the use for Task.FromResult in C#
- Why does Path.Combine not properly concatenate filenames that start with Path.DirectorySeparatorChar?
- Most common C# bitwise operations on enums
- Write to Windows Application Event Log without event source registration
- AppSettings get value from .config file
- How to check whether an object has certain method/property?
- How do I pronounce “=>” as used in lambda expressions in .Net [closed]
- Index of Currently Selected Row in DataGridView
- Getting day suffix when using DateTime.ToString()
- Return StreamReader to Beginning
- Can I split an IEnumerable into two by a boolean criteria without two queries?
- Why does .net use the UTF16 encoding for string, but uses UTF-8 as default for saving files?
- Static and Instance methods with the same name?
- HashSet that preserves ordering
- Pattern for calling WCF service using async/await
- Instancing a class with an internal constructor
- How to detect if machine is joined to domain?
- Calculate the display width of a string in C#?
- Found conflicts between System.Net.Http
- Is double Multiplication Broken in .NET? [duplicate]
- Can’t load a manifest resource with GetManifestResourceStream()
- Generic Type in constructor
- How to serialize/deserialize to `Dictionary` from custom XML not using XElement?
- Order of events ‘Form.Load’, ‘Form.Shown’ and ‘Form.Activated’ in Windows Forms
- How to prevent flickering in ListView when updating a single ListViewItem’s text?
- Get short date for System Nullable datetime (datetime ?) in C#
- JwtSecurityToken doesn’t expire when it should
- Getting Original Path from FileStream
- removing #region
- Drawing on top of controls inside a panel (C# WinForms)
- How do you log the machine name via log4net?
- How to check for valid xml in string input before calling .LoadXml()
- How to specify SSL protocol to use for WebClient class