diff options
author | Damien George <damien.p.george@gmail.com> | 2016-04-14 23:37:15 +0100 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2016-04-14 23:37:15 +0100 |
commit | 091dcaea2f4576c8cdbb1df68497e5b9e08b490d (patch) | |
tree | 84c0e177ebea54f8da091bbda66fbcb8f5a54dab | |
parent | bcd719ea3afa9d4dd8e1d8f5168e60e5c9fa992e (diff) | |
download | micropython-091dcaea2f4576c8cdbb1df68497e5b9e08b490d.tar.gz micropython-091dcaea2f4576c8cdbb1df68497e5b9e08b490d.zip |
esp8266/moduos: Add uos.mkdir function.
-rw-r--r-- | esp8266/moduos.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/esp8266/moduos.c b/esp8266/moduos.c index 8b9c177db0..cf3ccc4014 100644 --- a/esp8266/moduos.c +++ b/esp8266/moduos.c @@ -88,6 +88,11 @@ STATIC mp_obj_t os_listdir(mp_uint_t n_args, const mp_obj_t *args) { } STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(os_listdir_obj, 0, 1, os_listdir); +STATIC mp_obj_t os_mkdir(mp_obj_t path_in) { + return vfs_proxy_call(MP_QSTR_mkdir, 1, &path_in); +} +STATIC MP_DEFINE_CONST_FUN_OBJ_1(os_mkdir_obj, os_mkdir); + STATIC mp_obj_t os_remove(mp_obj_t path_in) { return vfs_proxy_call(MP_QSTR_remove, 1, &path_in); } @@ -115,6 +120,7 @@ STATIC const mp_rom_map_elem_t os_module_globals_table[] = { #if MICROPY_VFS_FAT { MP_ROM_QSTR(MP_QSTR_VfsFat), MP_ROM_PTR(&mp_fat_vfs_type) }, { MP_ROM_QSTR(MP_QSTR_listdir), MP_ROM_PTR(&os_listdir_obj) }, + { MP_ROM_QSTR(MP_QSTR_mkdir), MP_ROM_PTR(&os_mkdir_obj) }, { MP_ROM_QSTR(MP_QSTR_remove), MP_ROM_PTR(&os_remove_obj) }, #endif }; |