Esempio n. 1
0
        }         // proc CloseZipStream

        private void ZipFileItem(CmdletNotify notify, CmdletProgress bar, Stream src, ZipOutputStream zip, FileIndexItem item)
        {
            var entry = new ZipEntry(ZipEntry.CleanName(item.RelativePath));

            entry.DateTime          = item.LastWriteTimeUtc;
            entry.Size              = src.Length;
            entry.Comment           = item.GetComment();
            entry.CompressionMethod = ZipFile(item.RelativePath) ? CompressionMethod.Deflated : CompressionMethod.Stored;
            zip.PutNextEntry(entry);

            Stuff.CopyRawBytes(bar, item.RelativePath, src.Length, src, zip);

            zip.CloseEntry();
            zip.Flush();
        }         // proc ZipFileItem