summaryrefslogtreecommitdiff
path: root/shared-module/storage
diff options
context:
space:
mode:
authorJeff Epler <jepler@gmail.com>2018-03-27 21:28:18 -0500
committerJeff Epler <jepler@gmail.com>2018-03-27 21:28:18 -0500
commitc08f5a3a0071dd1940a09c6b5f0bdd8e4768c7f0 (patch)
treed28e2a678037549f3a9c30f6d93ab08b94206a11 /shared-module/storage
parent968763aa1d4ee5ed597d6f32b19fef6cbbed5c5c (diff)
Add storage.getmount to retrieve the mount object associated with a path
Diffstat (limited to 'shared-module/storage')
-rw-r--r--shared-module/storage/__init__.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/shared-module/storage/__init__.c b/shared-module/storage/__init__.c
index 3e7b90384..5b0bbe01e 100644
--- a/shared-module/storage/__init__.c
+++ b/shared-module/storage/__init__.c
@@ -121,3 +121,7 @@ STATIC mp_obj_t storage_object_from_path(const char* mount_path) {
void common_hal_storage_umount_path(const char* mount_path) {
common_hal_storage_umount_object(storage_object_from_path(mount_path));
}
+
+mp_obj_t common_hal_storage_getmount(const char *mount_path) {
+ return storage_object_from_path(mount_path);
+}