Function joinFilesToDir

  • Join a list of paths to the given parentDirPath. This is particularly useful for getting full paths from the output of readdir.

    Parameters

    • parentDirPath: string
    • childNames: readonly string[]

    Returns string[]

    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