From c08f5a3a0071dd1940a09c6b5f0bdd8e4768c7f0 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Tue, 27 Mar 2018 21:28:18 -0500 Subject: Add storage.getmount to retrieve the mount object associated with a path --- shared-module/storage/__init__.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'shared-module') 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); +} -- cgit v1.2.3