Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ DoCreateEntry()

ZipArchiveEntry System.IO.Compression.ZipArchive.DoCreateEntry ( string entryName,
CompressionLevel? compressionLevel )
inlineprivate

Definition at line 244 of file ZipArchive.cs.

245 {
246 if (entryName == null)
247 {
248 throw new ArgumentNullException("entryName");
249 }
250 if (string.IsNullOrEmpty(entryName))
251 {
252 throw new ArgumentException(System.SR.CannotBeEmpty, "entryName");
253 }
254 if (_mode == ZipArchiveMode.Read)
255 {
256 throw new NotSupportedException(System.SR.CreateInReadMode);
257 }
259 ZipArchiveEntry zipArchiveEntry = (compressionLevel.HasValue ? new ZipArchiveEntry(this, entryName, compressionLevel.Value) : new ZipArchiveEntry(this, entryName));
261 return zipArchiveEntry;
262 }
void AddEntry(ZipArchiveEntry entry)
static string CannotBeEmpty
Definition SR.cs:52
static string CreateInReadMode
Definition SR.cs:58
Definition SR.cs:7

References System.IO.Compression.ZipArchive._mode, System.IO.Compression.ZipArchive.AddEntry(), System.SR.CannotBeEmpty, System.SR.CreateInReadMode, and System.IO.Compression.ZipArchive.ThrowIfDisposed().

Referenced by System.IO.Compression.ZipArchive.CreateEntry(), and System.IO.Compression.ZipArchive.CreateEntry().