Check if permission has been granted for a filesystem handler. Returns the handler if permission is granted, otherwise None.
(details)
| 54 | |
| 55 | |
| 56 | async def _check_permission(details): |
| 57 | """ |
| 58 | Check if permission has been granted for a filesystem handler. Returns |
| 59 | the handler if permission is granted, otherwise None. |
| 60 | """ |
| 61 | handler = details.handler |
| 62 | options = details.options |
| 63 | permission = await handler.queryPermission(options) |
| 64 | return handler if permission == "granted" else None |
| 65 | |
| 66 | |
| 67 | async def mount(path, mode="readwrite", root="", id="pyscript"): |