UNPKG
glue-plugin-sdk
Version:
latest (0.0.14)
0.0.14
Gluestack Plugin SDK Manager
github.com/gluestack/glue-plugin-sdk
gluestack/glue-plugin-sdk
glue-plugin-sdk
/
src
/
helpers
/
file-exists.ts
11 lines
(9 loc)
•
233 B
text/typescript
View Raw
1
2
3
4
5
6
7
8
9
10
11
import
{ access, constants }
from
'node:fs/promises'
;
export
const
fileExists =
async
(
path
:
string
):
Promise
<
boolean
> => {
try
{
await
access
(path, constants.
R_OK
);
return
true
; }
catch
(err) {
return
false
; } };