(dir: string)
| 25 | * Retrieve any foolder in the given directory, at the top-level of depth. |
| 26 | */ |
| 27 | export async function getTopLevelFoldersInDir(dir: string): Promise<string[]> { |
| 28 | const rawFolders = await fs.readdir(dir, { withFileTypes: true }) |
| 29 | return rawFolders |
| 30 | .filter((fileOrFolder) => fileOrFolder.isDirectory()) |
| 31 | .map((folder) => pathToPosix(path.join(dir, folder.name))) |
| 32 | } |
| 33 | |
| 34 | /** |
| 35 | * Retrieve any folder nested into the given directory, at any level of depth. |
nothing calls this directly
no test coverage detected