summaryrefslogtreecommitdiffstatshomepage
path: root/teensy/import.c
blob: 2d5225b88884d1724f48f3e8bb2424d8aa11308e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#include <stdio.h>

#include "py/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;
}