'use server' import { readdir } from 'fs/promises' export const getDirectories = async (source: string) => { return (await readdir(source, { withFileTypes: true })) .filter(dirent => dirent.isDirectory()) .map(dirent => dirent.name) }