예제 #1
0
파일: NativeZip.cs 프로젝트: nobled/mono
		public static ZipHandle OpenArchive (ZlibFileFuncDef funcDef, Append append)
		{
			ZipHandle h = zipOpen2 ("", (int) append, IntPtr.Zero, ref funcDef);
			if (h.IsInvalid)
				throw new Exception ("Could not open the zip archive");
			return h;
		}
예제 #2
0
        public static UnzipHandle OpenArchive(ZlibFileFuncDef fileFuncs)
        {
            UnzipHandle handle = unzOpen2("", ref fileFuncs);

            if (handle.IsInvalid)
            {
                throw new Exception("Could not open unzip archive");
            }
            return(handle);
        }
예제 #3
0
        public static ZipHandle OpenArchive(ZlibFileFuncDef funcDef, Append append)
        {
            ZipHandle h = zipOpen2("", (int)append, IntPtr.Zero, ref funcDef);

            if (h.IsInvalid)
            {
                throw new Exception("Could not open the zip archive");
            }
            return(h);
        }
예제 #4
0
        public ZipStream(Stream dataStream, bool ownsStream)
        {
            // FIXME: Not necessarily true
            canRead  = true;
            canSeek  = true;
            canWrite = true;

            DataStream = dataStream;
            OwnsStream = ownsStream;

            ZlibFileFuncDef f = new ZlibFileFuncDef();

            f.opaque      = IntPtr.Zero;
            f.zclose_file = CloseFile_Native;
            f.zerror_file = TestError_Native;
            f.zopen_file  = OpenFile_Native;
            f.zread_file  = ReadFile_Native;
            f.zseek_file  = SeekFile_Native;
            f.ztell_file  = TellFile_Native;
            f.zwrite_file = WriteFile_Native;

            IOFunctions = f;
        }
예제 #5
0
파일: ZipStream.cs 프로젝트: nobled/mono
		public ZipStream (Stream dataStream, bool ownsStream)
		{
			// FIXME: Not necessarily true
			canRead = true;
			canSeek = true;
			canWrite = true;

			DataStream = dataStream;
			OwnsStream = ownsStream;
			
			ZlibFileFuncDef f = new ZlibFileFuncDef();
			
			f.opaque = IntPtr.Zero;
			f.zclose_file = CloseFile_Native;
			f.zerror_file = TestError_Native;
			f.zopen_file = OpenFile_Native;
			f.zread_file = ReadFile_Native;
			f.zseek_file = SeekFile_Native;
			f.ztell_file = TellFile_Native;
			f.zwrite_file = WriteFile_Native;

			IOFunctions = f;
		}
예제 #6
0
		static extern UnzipHandle unzOpen2 (string path,
		                                            ref ZlibFileFuncDef pzlib_filefunc_def);
예제 #7
0
		public static UnzipHandle OpenArchive (ZlibFileFuncDef fileFuncs)
		{
			UnzipHandle handle = unzOpen2 ("", ref fileFuncs);
			if (handle.IsInvalid)
				throw new Exception ("Could not open unzip archive");
			return handle;
		}
예제 #8
0
 static extern UnzipHandle unzOpen2(string path,
                                    ref ZlibFileFuncDef pzlib_filefunc_def);
예제 #9
0
 static extern ZipHandle zipOpen2(string pathname,
                                  int append,
                                  IntPtr globalcomment,                    // zipcharpc*
                                  ref ZlibFileFuncDef pzlib_filefunc_def); // zlib_filefunc_def*
예제 #10
0
파일: NativeZip.cs 프로젝트: nobled/mono
		static extern ZipHandle zipOpen2 (string pathname,
		                                  int append,
		                                  IntPtr globalcomment, // zipcharpc*
		                                  ref ZlibFileFuncDef pzlib_filefunc_def); // zlib_filefunc_def*