import.c 333 B

1234567891011121314151617
  1. #include <stdio.h>
  2. #include "py/lexer.h"
  3. #include "memzip.h"
  4. mp_import_stat_t mp_import_stat(const char *path) {
  5. MEMZIP_FILE_INFO info;
  6. if (memzip_stat(path, &info) != MZ_OK) {
  7. return MP_IMPORT_STAT_NO_EXIST;
  8. }
  9. if (info.is_dir) {
  10. return MP_IMPORT_STAT_DIR;
  11. }
  12. return MP_IMPORT_STAT_FILE;
  13. }