Module: AmxxZip ( Compress & UnCompress .Zip ) [UnFixed]

Adding Modules to help with scripting/coding plugins.
User avatar
Archive-Poster
Posts: 1090
Gender:
United States of America

Module: AmxxZip ( Compress & UnCompress .Zip ) [UnFixed]

Post by Archive-Poster »

First, Hi, I make this, But I don't test. I have to Sleep Now, So I Upload if someone want to test.

I Fix some errors an I add an example.

Code: Select all

/*
 * (C) Copyright 2010 Ramón 'Reymon' Berrutti <ramonberrutti@hotmail.com>
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 * See LICENSE.TXT file for more information.
 *
 */
 #if defined _AmxxZip_included
    #endinput
#endif
#define _AmxxZip_included
 
 
#if AMXX_VERSION_NUM >= 175
    #pragma reqlib AmxxZip
    #if !defined AMXMODX_NOAUTOLOAD
        #pragma loadlib AmxxZip
    #endif
#else
    #pragma library AmxxZip
#endif

enum ZipItemInfo
{
    ZipItem_Index = 0,
    ZipItem_Attr,
    ZipItem_Atime,
    ZipItem_Ctime,
    ZipItem_Mtime,
    ZipItem_CompSize,
    ZipItem_UncompSize
};


native AmxxZip:RB_CreateZip( const filename[], const password[] = "" );
native RB_ZipAdd( AmxxZip:Handle, const filename[], const zipfile[] );

native AmxxZip:RB_OpenZip( const filename[], const password[] = "" );
native RB_GetZipItem( AmxxZip:Handle, index, ZipItemInfo:var, &ret );
native RB_GetZipItemName( AmxxZip:Handle, index, outputname[], len );
native RB_FindZipItem( AmxxZip:Handle, const name[], bool:sensitive, &ret );
native RB_UnzipItem( AmxxZip:Handle, index, const pathfilename[] );
native RB_SetUnzipBaseDir( AmxxZip:Handle, const path );

native RB_CloseZip( AmxxZip:Handle );
Attachments
AmxxZip_Source.zip
(124.75 KiB) Downloaded 2 times
AmxxZip_amxx_i386.so.zip
(53.53 KiB) Downloaded 6 times
AmxxZip_amxx.dll.zip
(74 KiB) Downloaded 2 times

Who is online

Users browsing this forum: No registered users and 1 guest