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

            if (zipSegmentedStream._baseDir == string.Empty)
            {
                zipSegmentedStream._baseDir = ".";
            }
            zipSegmentedStream._SetWriteStream(0u);
            return(zipSegmentedStream);
        }
Exemplo n.º 2
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);
        }