no-shot / env
1 1
import { join } from "path";
2

3
/**
4
 * A utility function to join a directory with a filename to a single string.
5
 *
6
 * @param file - filename
7
 * @param dir - directory of the file
8
 * @returns a single file path string
9
 */
10 1
export function getFilePath(file: string, dir?: string): string {
11 1
  return join(dir || process.cwd(), file);
12
}
13

14 1
export default getFilePath;

Read our documentation on viewing source code .

Loading