Back to index

php5  5.3.10
Functions
zip_delete.c File Reference
#include "zipint.h"

Go to the source code of this file.

Functions

 zip_delete (struct zip *za, int idx)

Function Documentation

zip_delete ( struct zip za,
int  idx 
)

Definition at line 41 of file zip_delete.c.

{
    if (idx < 0 || idx >= za->nentry) {
       _zip_error_set(&za->error, ZIP_ER_INVAL, 0);
       return -1;
    }

    /* allow duplicate file names, because the file will
     * be removed directly afterwards */
    if (_zip_unchange(za, idx, 1) != 0)
       return -1;

    za->entry[idx].state = ZIP_ST_DELETED;

    return 0;
}

Here is the call graph for this function: