Join a list of paths to the given parentDirPath. This is particularly useful for getting full paths from the output of readdir.
parentDirPath
readdir
import {readdir} from 'node:fs/promises';import {join} from 'node:path';const parentDir = join('my', 'path');const dirs = joinFilesToDir(parentDir, await readdir(parentDir)); Copy
import {readdir} from 'node:fs/promises';import {join} from 'node:path';const parentDir = join('my', 'path');const dirs = joinFilesToDir(parentDir, await readdir(parentDir));
@augment-vir/node
Join a list of paths to the given
parentDirPath
. This is particularly useful for getting full paths from the output ofreaddir
.