export function rebaseTree(root, prefix) { root.path = `${prefix}/${root.path}`; if (root.file) root.file = new File([root.file], root.path, { lastModified: root.file.lastModified }); root.children.forEach((child) => rebaseTree(child, prefix)); return root; }