how to read files without fs

I have code like this to run all sql migeration files:
const dir = new URL('migrations', import.meta.url);

for (const file of fs.readdirSync(dir)) {}


given fs is not available, how can i accomplish the same.
Was this page helpful?