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 );