async function getAllFiles(parent, root) {
	root = root || parent.root;
	if (!parent.children || !root.isConnected) return;

	try {
		const entries = await fsOperation(parent.url).lsDir();
		const promises = [];

		for (const item of entries) {
			promises.push(createChildTree(parent, item, root));
		}

		await Promise.all(promises);
	} catch (error) {
		// retry after 3s
		parent.retriedCount += 1;
		if (parent.retriedCount > settings.value.maxRetryCount) return;
		if (settings.value.showRetryToast) {
			toast(`retrying: ${parent.path}`);
		}

		setTimeout(() => {
			// why not outside? because parent may be removed
			if (!root.isConnected) return;
			parent.children.length = 0;
			getAllFiles(parent);
		}, 3000);
	}
}
Get all file recursively
@param {Tree} parent - An array to store files
@param {Tree} [root] - Root path