#define ZIP_ER_OK 0 /* N No error */
#define ZIP_ER_MULTIDISK 1 /* N Multi-disk zip archives not supported */
#define ZIP_ER_RENAME 2 /* S Renaming temporary file failed */
#define ZIP_ER_CLOSE 3 /* S Closing zip archive failed */
#define ZIP_ER_SEEK 4 /* S Seek error */
#define ZIP_ER_READ 5 /* S Read error */
#define ZIP_ER_WRITE 6 /* S Write error */
#define ZIP_ER_CRC 7 /* N CRC error */
#define ZIP_ER_ZIPCLOSED 8 /* N Containing zip archive was closed */
#define ZIP_ER_NOENT 9 /* N No such file */
#define ZIP_ER_EXISTS 10 /* N File already exists */
#define ZIP_ER_OPEN 11 /* S Can't open file */
#define ZIP_ER_TMPOPEN 12 /* S Failure to create temporary file */
#define ZIP_ER_ZLIB 13 /* Z Zlib error */
#define ZIP_ER_MEMORY 14 /* N Malloc failure */
#define ZIP_ER_CHANGED 15 /* N Entry has been changed */
#define ZIP_ER_COMPNOTSUPP 16 /* N Compression method not supported */
#define ZIP_ER_EOF 17 /* N Premature EOF */
#define ZIP_ER_INVAL 18 /* N Invalid argument */
#define ZIP_ER_NOZIP 19 /* N Not a zip archive */
#define ZIP_ER_INTERNAL 20 /* N Internal error */
#define ZIP_ER_INCONS 21 /* N Zip archive inconsistent */
#define ZIP_ER_REMOVE 22 /* S Can't remove file */
#define ZIP_ER_DELETED 23 /* N Entry has been deleted */
Constantes pré-definidas
As contantes abaixo são definidas por esta extensão e somente estarão disponíveis quando a extensão foi compilada com o PHP ou carregada dinamicamente durante a execução.
ZipArchive usa constantes de classes. Há três tipos de constantes, Flags (FL_), erros (ER_) ou modo (sem prefixo).
-
ZIPARCHIVE::CREATE(integer) - Cria o arquivo se ele não existir.
-
ZIPARCHIVE::OVERWRITE(integer) - Sempre inicia um novo arquivo, este modo sobreescreverá o arquivo se ele já existir.
-
ZIPARCHIVE::EXCL(integer) - Emite erro se o arquivo já existir.
-
ZIPARCHIVE::CHECKCONS(integer) - Executa uma adicional verificação de consistência no arquivo, e emite erro se ele falhar.
-
ZIPARCHIVE::FL_NOCASE(integer) - Ignora maiúsculo e minúsculo no nome.
-
ZIPARCHIVE::FL_NODIR(integer) - Ignora componentes de diretório.
-
ZIPARCHIVE::FL_COMPRESSED(integer) - Lê a informação comprimida.
-
ZIPARCHIVE::FL_UNCHANGED(integer) - Usa os dados originais, ignorando mudanças.
-
ZIPARCHIVE::CM_DEFAULT(integer) - Melhor para descompactar ou armazenar.
-
ZIPARCHIVE::CM_STORE(integer) - Armazenado (não compresso).
-
ZIPARCHIVE::CM_SHRINK(integer) - shrunk
-
ZIPARCHIVE::CM_REDUCE_1(integer) - compressão com fator 1
-
ZIPARCHIVE::CM_REDUCE_2(integer) - compressão com fator 2
-
ZIPARCHIVE::CM_REDUCE_3(integer) - compressão com fator 3
-
ZIPARCHIVE::CM_REDUCE_4(integer) - compressão com fator 4
-
ZIPARCHIVE::CM_IMPLODE(integer) - implodido
-
ZIPARCHIVE::CM_DEFLATE(integer) - descompactado
-
ZIPARCHIVE::CM_DEFLATE64(integer) - deflate64
-
ZIPARCHIVE::CM_PKWARE_IMPLODE(integer) - Compactação PKWARE
-
ZIPARCHIVE::CM_BZIP2(integer) - Algoritmo BZIP2
-
ZIPARCHIVE::ER_OK(integer) - Sem erro.
-
ZIPARCHIVE::ER_MULTIDISK(integer) - Arquivos Multi-disk zip não suportados.
-
ZIPARCHIVE::ER_RENAME(integer) - Renomeia arquivo temporário falhado.
-
ZIPARCHIVE::ER_CLOSE(integer) - Fecha arquivo zip falhado
-
ZIPARCHIVE::ER_SEEK(integer) - Procura o erro
-
ZIPARCHIVE::ER_READ(integer) - Lê o erro
-
ZIPARCHIVE::ER_WRITE(integer) - Escreve o erro
-
ZIPARCHIVE::ER_CRC(integer) - CRC error
-
ZIPARCHIVE::ER_ZIPCLOSED(integer) - Containing zip archive was closed
-
ZIPARCHIVE::ER_NOENT(integer) - Arquivo não encontrado.
-
ZIPARCHIVE::ER_EXISTS(integer) - Arquivo já existente.
-
ZIPARCHIVE::ER_OPEN(integer) - Não foi possível abrir o arquivo.
-
ZIPARCHIVE::ER_TMPOPEN(integer) - Falha ao criar arquivo temporário.
-
ZIPARCHIVE::ER_ZLIB(integer) - Erro da Zlib
-
ZIPARCHIVE::ER_MEMORY(integer) - Falha na alocação de memória.
-
ZIPARCHIVE::ER_CHANGED(string) - Entrada foi modificada.
-
ZIPARCHIVE::ER_COMPNOTSUPP(integer) - Método de compressão não suportado.
-
ZIPARCHIVE::ER_EOF(integer) - Prematuro EOF
-
ZIPARCHIVE::ER_INVAL(integer) - Argumento inválido.
-
ZIPARCHIVE::ER_NOZIP(integer) - Não é um arquivo zip.
-
ZIPARCHIVE::ER_INTERNAL(integer) - Erro interno.
-
ZIPARCHIVE::ER_INCONS(integer) - Arquivo Zip inconsistente.
-
ZIPARCHIVE::ER_REMOVE(integer) - Não foi possível remove o arquivo.
-
ZIPARCHIVE::ER_DELETED(integer) - Entrada foi deletada.
scott at bluecamel dot eml dot cc ¶
5 years ago
