mirror of
https://github.com/theoludwig/programming-challenges.git
synced 2025-12-11 00:21:24 +01:00
feat: rewrite programming-challenges CLI (#3)
This commit is contained in:
10
cli/utils/isExistingPath.ts
Normal file
10
cli/utils/isExistingPath.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
import fs from 'fs'
|
||||
|
||||
export const isExistingPath = async (path: string): Promise<boolean> => {
|
||||
try {
|
||||
await fs.promises.access(path, fs.constants.F_OK)
|
||||
return true
|
||||
} catch {
|
||||
return false
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user