mirror of
https://github.com/micropython/micropython.git
synced 2026-01-05 19:50:30 +01:00
extmod: Add generic VFS sub-system.
This provides mp_vfs_XXX functions (eg mount, open, listdir) which are agnostic to the underlying filesystem type, and just require an object with the relevant filesystem-like methods (eg .mount, .open, .listidr) which can then be mounted. These mp_vfs_XXX functions would typically be used by a port to implement the "uos" module, and mp_vfs_open would be the builtin open function. This feature is controlled by MICROPY_VFS, disabled by default.
This commit is contained in:
@@ -398,6 +398,11 @@
|
||||
#define MICROPY_READER_POSIX (0)
|
||||
#endif
|
||||
|
||||
// Whether to use the VFS reader for importing files
|
||||
#ifndef MICROPY_READER_VFS
|
||||
#define MICROPY_READER_VFS (0)
|
||||
#endif
|
||||
|
||||
// Whether to use the FatFS reader for importing files
|
||||
#ifndef MICROPY_READER_FATFS
|
||||
#define MICROPY_READER_FATFS (0)
|
||||
@@ -621,6 +626,11 @@ typedef double mp_float_t;
|
||||
#define MICROPY_FSUSERMOUNT (0)
|
||||
#endif
|
||||
|
||||
// Support for generic VFS sub-system
|
||||
#ifndef MICROPY_VFS
|
||||
#define MICROPY_VFS (0)
|
||||
#endif
|
||||
|
||||
/*****************************************************************************/
|
||||
/* Fine control over Python builtins, classes, modules, etc */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user