2014-06-16 06:33:14 +01:00
|
|
|
#include <stdio.h>
|
|
|
|
#include <stdint.h>
|
|
|
|
|
|
|
|
#include "mpconfig.h"
|
2014-07-15 06:19:27 +01:00
|
|
|
#include "misc.h"
|
2014-06-16 06:33:14 +01:00
|
|
|
#include "qstr.h"
|
|
|
|
#include "lexer.h"
|
|
|
|
|
|
|
|
#include "memzip.h"
|
|
|
|
|
|
|
|
mp_import_stat_t mp_import_stat(const char *path) {
|
|
|
|
MEMZIP_FILE_INFO info;
|
|
|
|
|
|
|
|
if (memzip_stat(path, &info) != MZ_OK) {
|
|
|
|
return MP_IMPORT_STAT_NO_EXIST;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (info.is_dir) {
|
|
|
|
return MP_IMPORT_STAT_DIR;
|
|
|
|
}
|
|
|
|
return MP_IMPORT_STAT_FILE;
|
|
|
|
}
|