Back to index

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

Go to the source code of this file.

Functions

 zip_get_name (struct zip *za, int idx, int flags)
const char * _zip_get_name (struct zip *za, int idx, int flags, struct zip_error *error)

Function Documentation

const char* _zip_get_name ( struct zip za,
int  idx,
int  flags,
struct zip_error error 
)

Definition at line 49 of file zip_get_name.c.

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

    if ((flags & ZIP_FL_UNCHANGED) == 0) {
       if (za->entry[idx].state == ZIP_ST_DELETED) {
           _zip_error_set(error, ZIP_ER_DELETED, 0);
           return NULL;
       }
       if (za->entry[idx].ch_filename)
           return za->entry[idx].ch_filename;
    }

    if (za->cdir == NULL || idx >= za->cdir->nentry) {
       _zip_error_set(error, ZIP_ER_INVAL, 0);
       return NULL;
    }
    
    return za->cdir->entry[idx].filename;
}

Here is the call graph for this function:

Here is the caller graph for this function:

zip_get_name ( struct zip za,
int  idx,
int  flags 
)

Definition at line 41 of file zip_get_name.c.

{
    return _zip_get_name(za, idx, flags, &za->error);
}

Here is the call graph for this function:

Here is the caller graph for this function: