Example #1
0
        public static ZipSegmentedStream ForWriting(string name, int maxSegmentSize)
        {
            ZipSegmentedStream zss = new ZipSegmentedStream()
            {
                rwMode          = RwMode.Write,
                CurrentSegment  = 0,
                _baseName       = name,
                _maxSegmentSize = maxSegmentSize,
                _baseDir        = Path.GetDirectoryName(name)
            };

            // workitem 9522
            if (zss._baseDir == "")
            {
                zss._baseDir = ".";
            }

            zss._SetWriteStream(0);

            // Console.WriteLine("ZSS: ForWriting ({0})",
            //                    Path.GetFileName(zss.CurrentName));

            return(zss);
        }