3 instantiations of ZipArchiveEntry
System.IO.Compression (3)
201 references to ZipArchiveEntry
aspire (6)
Aspire.Cli.Tests (1)
Aspire.Dashboard (6)
Aspire.Dashboard.Tests (8)
crossgen2 (2)
ilc (2)
ILCompiler.ReadyToRun (1)
ILCompiler.RyuJit (1)
Microsoft.Arcade.Common (2)
Microsoft.Build (4)
Microsoft.Build.Tasks.Core (5)
Microsoft.DotNet.ApiSymbolExtensions (1)
Microsoft.DotNet.Build.Tasks.VisualStudio (1)
Microsoft.ML.Core (5)
Microsoft.ML.IntegrationTests (1)
Microsoft.ML.TestFramework (1)
Microsoft.TemplateEngine.Edge (3)
netstandard (1)
NuGet.Common (1)
NuGet.PackageManagement (3)
NuGet.Packaging (25)
PackageCreation\Authoring\PackageBuilder.cs (9)
892private ZipArchiveEntry CreateEntry(ZipArchive package, string entryName, CompressionLevel compressionLevel)
894var entry = package.CreateEntry(entryName, compressionLevel);
902private static ZipArchiveEntry CreatePackageFileEntry(ZipArchive package, string entryName, DateTimeOffset timeOffset, CompressionLevel compressionLevel, StringBuilder warningMessage)
904var entry = package.CreateEntry(entryName, compressionLevel);
930var entry = CreateEntry(package, path, CompressionLevel.Optimal);
1115var entry = CreatePackageFileEntry(package, entryName, lastWriteTime, CompressionLevel.Optimal, warningMessage);
1158ZipArchiveEntry relsEntry = CreateEntry(package, "_rels/.rels", CompressionLevel.Optimal);
1185ZipArchiveEntry relsEntry = CreateEntry(package, "[Content_Types].xml", CompressionLevel.Optimal);
1227ZipArchiveEntry packageEntry = CreateEntry(package, psmdcpPath, CompressionLevel.Optimal);
NuGet.Protocol (1)
sdk-tasks (1)
System.IO.Compression (61)
System\IO\Compression\ZipArchive.cs (36)
22private ZipArchiveEntry? _archiveStreamOwner;
24private readonly List<ZipArchiveEntry> _entries;
25private readonly ReadOnlyCollection<ZipArchiveEntry> _entriesCollection;
26private readonly Dictionary<string, ZipArchiveEntry> _entriesDictionary;
165foreach (ZipArchiveEntry entry in _entries)
191_entries = new List<ZipArchiveEntry>();
192_entriesCollection = new ReadOnlyCollection<ZipArchiveEntry>(_entries);
193_entriesDictionary = new Dictionary<string, ZipArchiveEntry>();
228public ReadOnlyCollection<ZipArchiveEntry> Entries
270public ZipArchiveEntry CreateEntry(string entryName)
285public ZipArchiveEntry CreateEntry(string entryName, CompressionLevel compressionLevel)
293/// so that a subsequent call to <see cref="ZipArchiveEntry.Open()"/> produces an encrypted stream.
304public ZipArchiveEntry CreateEntry(string entryName, ReadOnlySpan<char> password, ZipEncryptionMethod encryptionMethod)
306ZipArchiveEntry entry = DoCreateEntry(entryName, null);
315/// so that a subsequent call to <see cref="ZipArchiveEntry.Open()"/> produces an encrypted stream.
327public ZipArchiveEntry CreateEntry(string entryName, CompressionLevel compressionLevel, ReadOnlySpan<char> password, ZipEncryptionMethod encryptionMethod)
329ZipArchiveEntry entry = DoCreateEntry(entryName, compressionLevel);
363foreach (ZipArchiveEntry entry in _entries)
393public ZipArchiveEntry? GetEntry(string entryName)
403_entriesDictionary.TryGetValue(entryName, out ZipArchiveEntry? result);
470foreach (ZipArchiveEntry entry in _entries)
482private ZipArchiveEntry DoCreateEntry(string entryName, CompressionLevel? compressionLevel)
494ZipArchiveEntry entry = compressionLevel.HasValue ?
503internal void AcquireArchiveStream(ZipArchiveEntry entry)
521private void AddEntry(ZipArchiveEntry entry)
528internal void DebugAssertIsStillArchiveStreamOwner(ZipArchiveEntry entry) => Debug.Assert(_archiveStreamOwner == entry);
530internal void ReleaseArchiveStream(ZipArchiveEntry entry)
537internal void RemoveEntry(ZipArchiveEntry entry)
647_entries.Sort(ZipArchiveEntry.LocalHeaderOffsetComparer.Instance);
689ZipArchiveEntry lastEntry = _entries[_entries.Count - 1];
853private static void WriteFileCalculateOffsets(ZipArchiveEntry entry, ref long startingOffset, ref long nextFileOffset)
870private static void WriteFileCheckStartingOffset(ZipArchiveEntry entry, ref long completeRewriteStartingOffset)
911List<ZipArchiveEntry> entriesToWrite = _entries;
922foreach (ZipArchiveEntry entry in _entries)
951foreach (ZipArchiveEntry entry in entriesToWrite)
965foreach (ZipArchiveEntry entry in _entries)
System\IO\Compression\ZipCustomStreams.cs (10)
17private readonly Action<ZipArchiveEntry?>? _onClosed;
23private readonly ZipArchiveEntry? _zipArchiveEntry;
29private WrappedStream(Stream baseStream, bool closeBaseStream, ZipArchiveEntry? entry, Action<ZipArchiveEntry?>? onClosed, bool notifyEntryOnWrite)
39internal WrappedStream(Stream baseStream, ZipArchiveEntry entry, Action<ZipArchiveEntry?>? onClosed, bool notifyEntryOnWrite = false)
270private readonly ZipArchiveEntry _zipArchiveEntry;
274private readonly Action<long, long, uint, Stream, ZipArchiveEntry, EventHandler?> _saveCrcAndSizes;
284ZipArchiveEntry entry, EventHandler? onClose,
285Action<long, long, uint, Stream, ZipArchiveEntry, EventHandler?> saveCrcAndSizes)
System.IO.Compression.ZipFile (36)
System\IO\Compression\ZipFileExtensions.ZipArchive.Create.Async.cs (6)
46public static Task<ZipArchiveEntry> CreateEntryFromFileAsync(this ZipArchive destination, string sourceFileName, string entryName, CancellationToken cancellationToken = default) =>
74public static Task<ZipArchiveEntry> CreateEntryFromFileAsync(this ZipArchive destination,
108public static Task<ZipArchiveEntry> CreateEntryFromFileAsync(this ZipArchive destination,
138public static Task<ZipArchiveEntry> CreateEntryFromFileAsync(this ZipArchive destination,
142internal static async Task<ZipArchiveEntry> DoCreateEntryFromFileAsync(this ZipArchive destination, string sourceFileName, string entryName,
147(FileStream fs, ZipArchiveEntry entry) = InitializeDoCreateEntryFromFile(destination, sourceFileName, entryName, compressionLevel, useAsync: true, password.Span, encryption);
System\IO\Compression\ZipFileExtensions.ZipArchive.Create.cs (9)
44public static ZipArchiveEntry CreateEntryFromFile(this ZipArchive destination, string sourceFileName, string entryName) =>
76public static ZipArchiveEntry CreateEntryFromFile(this ZipArchive destination,
91public static ZipArchiveEntry CreateEntryFromFile(this ZipArchive destination, string sourceFileName, string entryName, ReadOnlySpan<char> password, ZipEncryptionMethod encryption) =>
124public static ZipArchiveEntry CreateEntryFromFile(this ZipArchive destination,
129internal static ZipArchiveEntry DoCreateEntryFromFile(this ZipArchive destination,
134(FileStream fs, ZipArchiveEntry entry) = InitializeDoCreateEntryFromFile(destination, sourceFileName, entryName, compressionLevel, useAsync: false, password, encryption);
147private static (FileStream, ZipArchiveEntry) InitializeDoCreateEntryFromFile(ZipArchive destination, string sourceFileName, string entryName, CompressionLevel? compressionLevel, bool useAsync, ReadOnlySpan<char> password = default, ZipEncryptionMethod encryption = ZipEncryptionMethod.None)
166ZipArchiveEntry entry;
195static partial void SetExternalAttributes(FileStream fs, ZipArchiveEntry entry);
System\IO\Compression\ZipFileExtensions.ZipArchiveEntry.Extract.Async.cs (5)
38public static Task ExtractToFileAsync(this ZipArchiveEntry source, string destinationFileName, CancellationToken cancellationToken = default) =>
70public static async Task ExtractToFileAsync(this ZipArchiveEntry source, string destinationFileName, bool overwrite, CancellationToken cancellationToken = default)
124public static Task ExtractToFileAsync(this ZipArchiveEntry source, string destinationFileName, ZipExtractionOptions options, CancellationToken cancellationToken = default)
131private static async Task ExtractToFileAsync(ZipArchiveEntry source, string destinationFileName, bool overwrite, ReadOnlyMemory<char> password, CancellationToken cancellationToken = default)
179internal static async Task ExtractRelativeToDirectoryAsync(this ZipArchiveEntry source, string destinationDirectoryName, bool overwrite, ReadOnlyMemory<char> password = default, CancellationToken cancellationToken = default)
System\IO\Compression\ZipFileExtensions.ZipArchiveEntry.Extract.cs (8)
33public static void ExtractToFile(this ZipArchiveEntry source, string destinationFileName) =>
63public static void ExtractToFile(this ZipArchiveEntry source, string destinationFileName, bool overwrite)
115public static void ExtractToFile(this ZipArchiveEntry source, string destinationFileName, ZipExtractionOptions options)
122private static void ExtractToFile(ZipArchiveEntry source, string destinationFileName, bool overwrite, ReadOnlySpan<char> password)
164private static void ExtractToFileInitialize(ZipArchiveEntry source, string destinationFileName, bool overwrite, bool useAsync, out FileStreamOptions fileStreamOptions)
209private static void ExtractToFileFinalize(ZipArchiveEntry source, string destinationFileName) =>
212private static bool ExtractRelativeToDirectoryCheckIfFile(ZipArchiveEntry source, string destinationDirectoryName, out string fileDestinationPath)
248internal static void ExtractRelativeToDirectory(this ZipArchiveEntry source, string destinationDirectoryName, bool overwrite, ReadOnlySpan<char> password = default)
System.IO.Packaging (22)