summaryrefslogtreecommitdiff
path: root/py
diff options
context:
space:
mode:
authorDamien George <damien@micropython.org>2024-11-15 11:16:04 +1100
committerDamien George <damien@micropython.org>2024-12-20 21:58:50 +1100
commit8b6bd43eaba005c24d277fa581c945b40213059d (patch)
treeef6f74d06981b9fde816ec6261dd361a0c09b424 /py
parenta3128f89ccb1d24d0ddaec7164d2fa8a101b8ac3 (diff)
extmod/vfs: Guard mutating fs functions with MICROPY_VFS_WRITABLE.
Enabled by default. Useful for ports that need the VFS but don't have any writable filesystems. Signed-off-by: Damien George <damien@micropython.org>
Diffstat (limited to 'py')
-rw-r--r--py/mpconfig.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/py/mpconfig.h b/py/mpconfig.h
index b31da2a37..a330cadc4 100644
--- a/py/mpconfig.h
+++ b/py/mpconfig.h
@@ -991,6 +991,11 @@ typedef double mp_float_t;
#define MICROPY_VFS (0)
#endif
+// Whether to include support for writable filesystems.
+#ifndef MICROPY_VFS_WRITABLE
+#define MICROPY_VFS_WRITABLE (1)
+#endif
+
// Support for VFS POSIX component, to mount a POSIX filesystem within VFS
#ifndef MICROPY_VFS_POSIX
#define MICROPY_VFS_POSIX (0)