File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change 3232#include "py/obj.h"
3333#include "py/objtuple.h"
3434#include "py/objstr.h"
35+ #include "py/runtime.h"
3536#include "genhdr/mpversion.h"
3637#include "user_interface.h"
3738
@@ -84,10 +85,16 @@ STATIC mp_obj_t os_listdir(mp_uint_t n_args, const mp_obj_t *args) {
8485}
8586STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN (os_listdir_obj , 0 , 1 , os_listdir );
8687
88+ STATIC mp_obj_t os_remove (mp_obj_t path_in ) {
89+ return vfs_proxy_call (MP_QSTR_remove , 1 , & path_in );
90+ }
91+ STATIC MP_DEFINE_CONST_FUN_OBJ_1 (os_remove_obj , os_remove );
92+
8793STATIC const mp_rom_map_elem_t os_module_globals_table [] = {
8894 { MP_ROM_QSTR (MP_QSTR___name__ ), MP_ROM_QSTR (MP_QSTR_uos ) },
8995 { MP_ROM_QSTR (MP_QSTR_uname ), MP_ROM_PTR (& os_uname_obj ) },
9096 { MP_ROM_QSTR (MP_QSTR_listdir ), MP_ROM_PTR (& os_listdir_obj ) },
97+ { MP_ROM_QSTR (MP_QSTR_remove ), MP_ROM_PTR (& os_remove_obj ) },
9198 #if MICROPY_VFS_FAT
9299 { MP_ROM_QSTR (MP_QSTR_VfsFat ), MP_ROM_PTR (& mp_fat_vfs_type ) },
93100 #endif
You can’t perform that action at this time.
0 commit comments