Esempio n. 1
0
        public int GetStream(uint index, out ISequentialOutStream outStream, AskMode askExtractMode)
        {
            if (askExtractMode != AskMode.kExtract)
            {
                outStream = null;
                return(0);
            }

            if (this.streams == null)
            {
                outStream = null;
                return(0);
            }

            Stream stream = this.streams[(int)index];

            if (stream == null)
            {
                outStream = null;
                return(0);
            }

            outStream = new OutStreamWrapper(stream);

            return(0);
        }
Esempio n. 2
0
        public int GetStream(uint index, out ISequentialOutStream outStream, AskMode askExtractMode)
        {
            if ((index != this.fileNumber) || (askExtractMode != AskMode.kExtract))
            {
                outStream = null;
                return(0);
            }

            outStream = new OutStreamWrapper(this.stream);

            return(0);
        }
Esempio n. 3
0
        public int GetStream(uint index, out ISequentialOutStream outStream, AskMode askExtractMode)
        {
            if ((index == this.FileNumber) && (askExtractMode == AskMode.kExtract))
            {
                this.FileStream = new OutStreamWrapper(this.stream);
                outStream       = this.FileStream;
            }
            else
            {
                outStream = null;
            }

            return(0);
        }
Esempio n. 4
0
        public int GetStream(uint index, out ISequentialOutStream outStream, AskMode askExtractMode)
        {
            if (streams != null)
            {
                if (streams[(int)index] == null)
                {
                    outStream = null;
                    return(0);
                }
                this.FileStream = new OutStreamWrapper(streams[(int)index]);
                outStream       = this.FileStream;
            }
            else
            {
                outStream = null;
            }

            return(0);
        }
Esempio n. 5
0
        public int GetStream(uint index, out ISequentialOutStream outStream, AskMode askExtractMode)
        {
            if ((index == this.FileNumber) && (askExtractMode == AskMode.kExtract))
            {
                string FileDir = Path.GetDirectoryName(this.FileName);
                if (!string.IsNullOrEmpty(FileDir))
                {
                    Directory.CreateDirectory(FileDir);
                }
                this.FileStream = new OutStreamWrapper(File.Create(this.FileName));

                outStream = this.FileStream;
            }
            else
            {
                outStream = null;
            }

            return(0);
        }