Examples > file-tool PLUGIN.JS (2/5) container.innerHTML = `
`; let duplicates = []; // paths to move // One request at a time: the reader's web server is single-threaded. async function listDir(path) { const r = await fetch('/api/files?path=' + encodeURIComponent(path)); if (!r.ok) throw new Error(`list ${path}: HTTP ${r.status}`); return r.json(); } Next: 05 plugin.js (3/5)