File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -88,6 +88,11 @@ STATIC mp_obj_t os_listdir(mp_uint_t n_args, const mp_obj_t *args) {
8888}
8989STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN (os_listdir_obj , 0 , 1 , os_listdir );
9090
91+ STATIC mp_obj_t os_mkdir (mp_obj_t path_in ) {
92+ return vfs_proxy_call (MP_QSTR_mkdir , 1 , & path_in );
93+ }
94+ STATIC MP_DEFINE_CONST_FUN_OBJ_1 (os_mkdir_obj , os_mkdir );
95+
9196STATIC mp_obj_t os_remove (mp_obj_t path_in ) {
9297 return vfs_proxy_call (MP_QSTR_remove , 1 , & path_in );
9398}
@@ -115,6 +120,7 @@ STATIC const mp_rom_map_elem_t os_module_globals_table[] = {
115120 #if MICROPY_VFS_FAT
116121 { MP_ROM_QSTR (MP_QSTR_VfsFat ), MP_ROM_PTR (& mp_fat_vfs_type ) },
117122 { MP_ROM_QSTR (MP_QSTR_listdir ), MP_ROM_PTR (& os_listdir_obj ) },
123+ { MP_ROM_QSTR (MP_QSTR_mkdir ), MP_ROM_PTR (& os_mkdir_obj ) },
118124 { MP_ROM_QSTR (MP_QSTR_remove ), MP_ROM_PTR (& os_remove_obj ) },
119125 #endif
120126};
You can’t perform that action at this time.
0 commit comments