Assimp  v4.1. (December 2018)
zip.c File Reference

Classes

struct  zip_entry_t
 
struct  zip_t
 

Macros

#define CLEANUP(ptr)
 
#define FILESYSTEM_PREFIX_LEN(P)   0
 
#define ISSLASH(C)   ((C) == '/')
 
#define MKDIR(DIRNAME)   mkdir(DIRNAME, 0755)
 
#define STRCLONE(STR)   ((STR) ? strdup(STR) : NULL)
 

Functions

static char * basename (const char *name)
 
static int mkpath (const char *path)
 
static char * strrpl (const char *str, char oldchar, char newchar)
 
void zip_close (struct zip_t *zip)
 
int zip_create (const char *zipname, const char *filenames[], size_t len)
 
int zip_entry_close (struct zip_t *zip)
 
int zip_entry_extract (struct zip_t *zip, size_t(*on_extract)(void *arg, unsigned long long offset, const void *buf, size_t bufsize), void *arg)
 
int zip_entry_fread (struct zip_t *zip, const char *filename)
 
int zip_entry_fwrite (struct zip_t *zip, const char *filename)
 
int zip_entry_open (struct zip_t *zip, const char *entryname)
 
int zip_entry_read (struct zip_t *zip, void **buf, size_t *bufsize)
 
int zip_entry_write (struct zip_t *zip, const void *buf, size_t bufsize)
 
int zip_extract (const char *zipname, const char *dir, int(*on_extract)(const char *filename, void *arg), void *arg)
 
struct zip_tzip_open (const char *zipname, int level, char mode)
 

Macro Definition Documentation

◆ CLEANUP

#define CLEANUP (   ptr)
Value:
do { \
if (ptr) { \
free((void *)ptr); \
ptr = NULL; \
} \
} while (0)

◆ FILESYSTEM_PREFIX_LEN

#define FILESYSTEM_PREFIX_LEN (   P)    0

◆ ISSLASH

#define ISSLASH (   C)    ((C) == '/')

◆ MKDIR

#define MKDIR (   DIRNAME)    mkdir(DIRNAME, 0755)

◆ STRCLONE

#define STRCLONE (   STR)    ((STR) ? strdup(STR) : NULL)

Function Documentation

◆ basename()

static char* basename ( const char *  name)
static

◆ mkpath()

static int mkpath ( const char *  path)
static

◆ strrpl()

static char* strrpl ( const char *  str,
char  oldchar,
char  newchar 
)
static

◆ zip_close()

void zip_close ( struct zip_t zip)

◆ zip_create()

int zip_create ( const char *  zipname,
const char *  filenames[],
size_t  len 
)

◆ zip_entry_close()

int zip_entry_close ( struct zip_t zip)

◆ zip_entry_extract()

int zip_entry_extract ( struct zip_t zip,
size_t(*)(void *arg, unsigned long long offset, const void *buf, size_t bufsize)  on_extract,
void *  arg 
)

◆ zip_entry_fread()

int zip_entry_fread ( struct zip_t zip,
const char *  filename 
)

◆ zip_entry_fwrite()

int zip_entry_fwrite ( struct zip_t zip,
const char *  filename 
)

◆ zip_entry_open()

int zip_entry_open ( struct zip_t zip,
const char *  entryname 
)

◆ zip_entry_read()

int zip_entry_read ( struct zip_t zip,
void **  buf,
size_t *  bufsize 
)

◆ zip_entry_write()

int zip_entry_write ( struct zip_t zip,
const void *  buf,
size_t  bufsize 
)

◆ zip_extract()

int zip_extract ( const char *  zipname,
const char *  dir,
int(*)(const char *filename, void *arg)  on_extract,
void *  arg 
)

◆ zip_open()

struct zip_t* zip_open ( const char *  zipname,
int  level,
char  mode 
)