We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a93144c commit d4ce57eCopy full SHA for d4ce57e
1 file changed
extmod/vfs.c
@@ -34,6 +34,9 @@
34
35
#if MICROPY_VFS
36
37
+#if MICROPY_VFS_POSIX
38
+#include "extmod/vfs_posix.h"
39
+#endif
40
#if MICROPY_VFS_FAT
41
#include "extmod/vfs_fat.h"
42
#endif
@@ -124,8 +127,14 @@ mp_import_stat_t mp_vfs_import_stat(const char *path) {
124
127
if (vfs == MP_VFS_NONE || vfs == MP_VFS_ROOT) {
125
128
return MP_IMPORT_STAT_NO_EXIST;
126
129
}
130
+
131
+ // Fast paths for known VFS types
132
+ #if MICROPY_VFS_POSIX
133
+ if (mp_obj_get_type(vfs->obj) == &mp_type_vfs_posix) {
134
+ return mp_vfs_posix_import_stat(MP_OBJ_TO_PTR(vfs->obj), path_out);
135
+ }
136
+ #endif
137
- // fast paths for known VFS types
138
if (mp_obj_get_type(vfs->obj) == &mp_fat_vfs_type) {
139
return fat_vfs_import_stat(MP_OBJ_TO_PTR(vfs->obj), path_out);
140
0 commit comments