mirror of
https://github.com/micropython/micropython.git
synced 2026-01-04 11:10:14 +01:00
esp8266/main: mp_builtin_open(): Implement, using vfs_proxy_call().
This commit is contained in:
@@ -123,8 +123,14 @@ mp_import_stat_t mp_import_stat(const char *path) {
|
||||
#endif
|
||||
}
|
||||
|
||||
mp_obj_t vfs_proxy_call(qstr method_name, mp_uint_t n_args, const mp_obj_t *args);
|
||||
mp_obj_t mp_builtin_open(uint n_args, const mp_obj_t *args, mp_map_t *kwargs) {
|
||||
#if MICROPY_VFS_FAT
|
||||
// TODO: Handle kwargs!
|
||||
return vfs_proxy_call(MP_QSTR_open, n_args, args);
|
||||
#else
|
||||
return mp_const_none;
|
||||
#endif
|
||||
}
|
||||
MP_DEFINE_CONST_FUN_OBJ_KW(mp_builtin_open_obj, 1, mp_builtin_open);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user