Files
pnpm/exec/plugin-commands-script-runners/src/existsInDir.ts

9 lines
247 B
TypeScript

import path from 'path'
import exists from 'path-exists'
export async function existsInDir (entityName: string, dir: string) {
const entityPath = path.join(dir, entityName)
if (await exists(entityPath)) return entityPath
return undefined
}