(root_path_obj)
| 83 | } |
| 84 | |
| 85 | function ply_storage_new(root_path_obj) { |
| 86 | var op_id = ply_storage_next_op_id(); |
| 87 | var root_path = consume_js_object(root_path_obj); |
| 88 | |
| 89 | (async function () { |
| 90 | try { |
| 91 | var root_handle = await ply_storage_resolve_root(root_path); |
| 92 | var storage_id = ply_storage_root_uid; |
| 93 | ply_storage_root_uid += 1; |
| 94 | ply_storage_roots[storage_id] = root_handle; |
| 95 | ply_storage_finish_ok(op_id, { storage_id: storage_id }); |
| 96 | } catch (error) { |
| 97 | ply_storage_finish_err(op_id, error); |
| 98 | } |
| 99 | }()); |
| 100 | |
| 101 | return op_id; |
| 102 | } |
| 103 | |
| 104 | function ply_storage_save_bytes(storage_id, relative_path_obj, data_obj) { |
| 105 | var op_id = ply_storage_next_op_id(); |
no test coverage detected