Bloom.BloomZipFile.Save C# (CSharp) Method

Save() public method

public Save ( ) : void
return void
        public void Save()
        {
            _zipStream.IsStreamOwner = true; // makes the Close() also close the underlying stream
            _zipStream.Close();
        }

Usage Example

        public void UploadSmokeTest()
        {
            using(var folder = new TemporaryFolder("Upload Smoke Test"))
            {
                File.WriteAllText(folder.Combine("hello there.txt"), "hello there");
                using(var bookZip = TempFile.WithFilenameInTempFolder("Upload Smoketest.zip"))
                {
                    var zip = new BloomZipFile(bookZip.Path);
                    zip.AddDirectory(folder.FolderPath);
                    zip.Save();

                    var progress = new StringBuilderProgress();
                    ProblemBookUploader.UploadBook(BloomS3Client.UnitTestBucketName, bookZip.Path,progress);
                    Assert.IsTrue(progress.Text.Contains("Success"), progress.Text);
                }
            }
        }
All Usage Examples Of Bloom.BloomZipFile::Save