MCPcopy Create free account
hub / github.com/TheRedDeveloper/ply-engine / ply_storage_resolve_parent_dir

Function ply_storage_resolve_parent_dir

js/storage.js:63–75  ·  view source on GitHub ↗
(root_handle, relative_path, create_dirs)

Source from the content-addressed store, hash-verified

61}
62
63async function ply_storage_resolve_parent_dir(root_handle, relative_path, create_dirs) {
64 var parts = ply_storage_split_path(relative_path);
65 var dir = root_handle;
66
67 for (var i = 0; i < parts.length - 1; i += 1) {
68 dir = await dir.getDirectoryHandle(parts[i], { create: create_dirs });
69 }
70
71 return {
72 dir: dir,
73 file_name: parts[parts.length - 1]
74 };
75}
76
77function ply_storage_get_root(storage_id) {
78 var root = ply_storage_roots[storage_id];

Callers 4

ply_storage_save_bytesFunction · 0.85
ply_storage_load_bytesFunction · 0.85
ply_storage_removeFunction · 0.85
ply_storage_exportFunction · 0.85

Calls 1

ply_storage_split_pathFunction · 0.85

Tested by

no test coverage detected