예제 #1
0
        // Token: 0x0600065A RID: 1626 RVA: 0x0003A208 File Offset: 0x00038408
        public ZipEntry PutNextEntry(string entryName)
        {
            if (string.IsNullOrEmpty(entryName))
            {
                throw new ArgumentNullException("entryName");
            }
            if (this._disposed)
            {
                this._exceptionPending = true;
                throw new InvalidOperationException("The stream has been closed.");
            }
            this._FinishCurrentEntry();
            this._currentEntry            = ZipEntry.CreateForZipOutputStream(entryName);
            this._currentEntry._container = new ZipContainer(this);
            ZipEntry currentEntry = this._currentEntry;

            currentEntry._BitField |= 8;
            this._currentEntry.SetEntryTimes(DateTime.Now, DateTime.Now, DateTime.Now);
            this._currentEntry.CompressionLevel       = this.CompressionLevel;
            this._currentEntry.CompressionMethod      = this.CompressionMethod;
            this._currentEntry.Password               = this._password;
            this._currentEntry.Encryption             = this.Encryption;
            this._currentEntry.AlternateEncoding      = this.AlternateEncoding;
            this._currentEntry.AlternateEncodingUsage = this.AlternateEncodingUsage;
            if (entryName.EndsWith("/"))
            {
                this._currentEntry.MarkAsDirectory();
            }
            this._currentEntry.EmitTimesInWindowsFormatWhenSaving = ((this._timestamp & ZipEntryTimestamp.Windows) != ZipEntryTimestamp.None);
            this._currentEntry.EmitTimesInUnixFormatWhenSaving    = ((this._timestamp & ZipEntryTimestamp.Unix) != ZipEntryTimestamp.None);
            this.InsureUniqueEntry(this._currentEntry);
            this._needToWriteEntryHeader = true;
            return(this._currentEntry);
        }