extmod/modvfs: Add new "vfs" module with mount/umount and Vfs classes.

They have been moved from the "os" module.

Signed-off-by: Damien George <damien@micropython.org>
This commit is contained in:
Damien George
2023-10-13 14:53:02 +11:00
parent aaba1d8a6c
commit e7020463f1
7 changed files with 80 additions and 1 deletions

View File

@@ -195,6 +195,10 @@ STATIC const mp_rom_map_elem_t os_module_globals_table[] = {
#if MICROPY_VFS
{ MP_ROM_QSTR(MP_QSTR_ilistdir), MP_ROM_PTR(&mp_vfs_ilistdir_obj) },
#endif
// The following MicroPython extensions are deprecated. Use the `vfs` module instead.
#if !MICROPY_PREVIEW_VERSION_2 && MICROPY_VFS
{ MP_ROM_QSTR(MP_QSTR_mount), MP_ROM_PTR(&mp_vfs_mount_obj) },
{ MP_ROM_QSTR(MP_QSTR_umount), MP_ROM_PTR(&mp_vfs_umount_obj) },
#if MICROPY_VFS_FAT