Archived
1
0

Move isFile into util

That allows its use in entry.ts as well.
This commit is contained in:
Asher
2020-11-03 14:40:06 -06:00
parent c72c53f64d
commit c10450c4c5
3 changed files with 14 additions and 24 deletions

View File

@ -261,3 +261,12 @@ export function canConnect(path: string): Promise<boolean> {
})
})
}
export const isFile = async (path: string): Promise<boolean> => {
try {
const stat = await fs.stat(path)
return stat.isFile()
} catch (error) {
return false
}
}