async function expandList($list) {
	const { $ul, $title } = $list;
	const { url } = $title.dataset;

	const { saveState, listState, $node } = openFolder.find(url);
	const startLoading = () => $node.$title.classList.add("loading");
	const stopLoading = () => $node.$title.classList.remove("loading");

	if (!$ul) return;

	$ul.textContent = null;
	if (saveState) listState[url] = $list.unclasped;
	if (!$list.unclasped) return;

	try {
		startLoading();
		const entries = await fsOperation(url).lsDir();
		helpers
			.sortDir(entries, {
				sortByName: true,
				showHiddenFiles: true,
			})
			.map((entry) => {
				const name = entry.name || Path.basename(entry.url);
				if (entry.isDirectory) {
					const $list = createFolderTile(name, entry.url);
					$ul.appendChild($list);

					if (listState[entry.url]) {
						$list.expand();
					}
				} else {
					const $item = createFileTile(name, entry.url);
					$ul.append($item);
				}
			});
	} catch (err) {
		$list.collapse();
		if (err?.includes("Invalid message length")) {
			console.error(err);
			toast("SFTP connection broken. Restart the app");
			return;
		}
		helpers.error(err);
	} finally {
		stopLoading();
	}
}
Expand the list
@param {Collapsible} $list