summaryrefslogtreecommitdiff
path: root/extmod/vfs.h
diff options
context:
space:
mode:
authorScott Shawcroft <scott.shawcroft@gmail.com>2017-06-27 15:17:30 -0700
committerScott Shawcroft <scott.shawcroft@gmail.com>2017-06-27 15:17:30 -0700
commit778e975936b9e892c4f1b85ce73462a0ce6d36d2 (patch)
tree9e365392d9150c3c724bb1f14fa07025270dbe21 /extmod/vfs.h
parente87a61ffb4ad089b7eb5eb4512cb57c085fd9136 (diff)
Split uos module into os and storage.
os is a subset of CPython's os. storage contains additional file system mounting functionality based on UNIX's mount management. Fixes #140
Diffstat (limited to 'extmod/vfs.h')
-rw-r--r--extmod/vfs.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/extmod/vfs.h b/extmod/vfs.h
index edaeb5349..3302f55f4 100644
--- a/extmod/vfs.h
+++ b/extmod/vfs.h
@@ -53,6 +53,17 @@ typedef struct _mp_vfs_mount_t {
struct _mp_vfs_mount_t *next;
} mp_vfs_mount_t;
+typedef struct _mp_vfs_ilistdir_it_t {
+ mp_obj_base_t base;
+ mp_fun_1_t iternext;
+ union {
+ mp_vfs_mount_t *vfs;
+ mp_obj_t iter;
+ } cur;
+ bool is_str;
+ bool is_iter;
+} mp_vfs_ilistdir_it_t;
+
mp_vfs_mount_t *mp_vfs_lookup_path(const char *path, const char **path_out);
mp_import_stat_t mp_vfs_import_stat(const char *path);
mp_obj_t mp_vfs_mount(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args);
@@ -69,6 +80,8 @@ mp_obj_t mp_vfs_rmdir(mp_obj_t path_in);
mp_obj_t mp_vfs_stat(mp_obj_t path_in);
mp_obj_t mp_vfs_statvfs(mp_obj_t path_in);
+mp_obj_t mp_vfs_ilistdir_it_iternext(mp_obj_t self_in);
+
MP_DECLARE_CONST_FUN_OBJ_KW(mp_vfs_mount_obj);
MP_DECLARE_CONST_FUN_OBJ_1(mp_vfs_umount_obj);
MP_DECLARE_CONST_FUN_OBJ_KW(mp_vfs_open_obj);